Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8891797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:49:57+00:00 2026-06-14T22:49:57+00:00

I have tried doing POS tagging using openNLP POS Models on a normal Java

  • 0

I have tried doing POS tagging using openNLP POS Models on a normal Java application. Now I would like to implement it on Android platform. I am not sure what is the Android requirement or restrictions as I am not able to read the models (binary file) and execute the POS tagging properly.

I tried getting the .bin file from external storage as well as putting it in an external libraries but still it couldn’t work. These are my codes:

InputStream modelIn = null;
POSModel model = null;

String path = Environment.getExternalStorageDirectory().getPath() + "/TextSumIt/en-pos-maxent.bin";

modelIn = new BufferedInputStream( new FileInputStream(path));
model = new POSModel(modelIn);

The error I got:

11-15 06:39:35.072: W/System.err(565): opennlp.tools.util.InvalidFormatException: The profile data stream has an invalid format!
11-15 06:39:35.177: W/System.err(565):  at opennlp.tools.dictionary.serializer.DictionarySerializer.create(DictionarySerializer.java:224)
11-15 06:39:35.177: W/System.err(565):  at opennlp.tools.postag.POSDictionary.create(POSDictionary.java:282)
11-15 06:39:35.182: W/System.err(565):  at opennlp.tools.postag.POSModel$POSDictionarySerializer.create(POSModel.java:48)
11-15 06:39:35.182: W/System.err(565):  at opennlp.tools.postag.POSModel$POSDictionarySerializer.create(POSModel.java:44)
11-15 06:39:35.182: W/System.err(565):  at opennlp.tools.util.model.BaseModel.<init>(BaseModel.java:135)
11-15 06:39:35.197: W/System.err(565):  at opennlp.tools.postag.POSModel.<init>(POSModel.java:93)
11-15 06:39:35.197: W/System.err(565):  at com.main.textsumit.SummarizationActivity.postagWords(SummarizationActivity.java:676)
11-15 06:39:35.205: W/System.err(565):  at com.main.textsumit.SummarizationActivity.generateSummary(SummarizationActivity.java:252)
11-15 06:39:35.205: W/System.err(565):  at com.main.textsumit.SummarizationActivity.onCreate(SummarizationActivity.java:127)

What is it that cause it not reading the model properly? And how should I resolve this? Please help.

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T22:49:58+00:00Added an answer on June 14, 2026 at 10:49 pm

    For what it’s worth, if this is still an issue: I had a similar issue attempting to use the POS model in a different context (non-Android), and in my case it appeared to be the extraction failing from the bin file, not anything with the model itself. It appears to be local to the tags.tagdict file in the archive (as suggested here http://sharpnlp.codeplex.com/discussions/263620), so if you don’t need that currently (and I didn’t for my simple scenarios) then try removing it from the archive. (But leave the archive intact as it’s expected to arrive in zip’d form.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am running a PHP/Yii application on Apache. I have tried doing the following:
I have written a game using Quartz2d. I would like a insert a background
Before I have tried about doing one attachment (upload) for each record of my
I have two tables: Contestant and Votes Contestant hasMany Votes I've tried doing a
I am doing a streamed musicplayer for android. I have tried with MediaPlayer mp.setDataSource(http://www.myServerPage.com/songUrl.mp3);
I have tried doing the research through this site to correct the problem on
I have a login form as below, I have tried doing this by onkeydown
I havent found info on this subject yet, but maybe someone have tried doing
I have a rails 3 application that I'd like to deploy. My deployment environment
I have tried doing this via Chello (a .NET wrapper for the Trello API)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.