Search the web
Sign In
New User? Sign Up
LingPipe
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
ChineseToken tutorial sample in version 3.6.0 doesn't work   Message List  
Reply | Forward Message #641 of 777 |
I recently downloaded LingPipe 3.6.0 and tried the ChineseToken tutorial
sample.  I always got NullPointerException.
My environment is:
- Window XP
- Java 1.5.0_11
- LingPipe version 3. 6.0
-Place icwb2-data.zip in
C:\LanProcessing\lingpipe-3.6.0\demos\data\sigHan2005\dist\icwb2-data.zip
directory
 
I want to run the ChineseToken sample to get the similar output as described in
http://alias-i.com/lingpipe/demos/tutorial/chineseTokens/read-me.html
 
Attached is the icwb2-data.zip file and build.xml file that I used.
 
 
I ran "ant run_cityu05" task in build..xml file and got the error:
 
 C:\LanProcessing\lingpipe-3.6.0\demos\tutorial\chineseTokens>ant run-cityu05
Buildfile: build.xml
 
compile:
 
run-cityu05:
     [java] CHINESE TOKENS 2005
     [java]     Data Zip
File=C:\LanProcessing\lingpipe-3.6.0\demos\data\sigHan2005\dist\icwb2-data
.zip
     [java]     Corpus Name=cityu
     [java]     Output File Name=cityu.segments
     [java]     Known Tokens File Name=cityu.knownWords
     [java]     Max N-gram=5
     [java]     Lambda factor=5.0
     [java]     Num chars=5000
     [java]     Max n-best=1024
     [java] Reading Data from entry=icwb2-data/training/cityu_training.utf8
     [java]   Found 53019 sentences.
     [java]   Found 4922 distinct characters.
     [java]   Found 69086 distinct tokens.
     [java] EXCEPTION IN RUN:
     [java] java.lang.NullPointerException
     [java]     at
com.aliasi.spell.CompiledSpellChecker.setTokenSet(CompiledSpellChecker.java:665)
 
     [java]     at
com.aliasi.spell.CompiledSpellChecker.<init>(CompiledSpellChecker.java:307)
     [java]     at
com.aliasi.spell.CompiledSpellChecker.<init>(CompiledSpellChecker.java:336)
     [java]     at
com.aliasi.spell.CompiledSpellChecker.<init>(CompiledSpellChecker.java:361)
     [java]     at
com.aliasi.spell.CompiledSpellChecker.<init>(CompiledSpellChecker.java:381)
     [java]     at
com.aliasi.spell.TrainSpellChecker$Externalizer.read(TrainSpellChecker.java:406)
 
     [java]     at
com.aliasi.util.AbstractExternalizable.readExternal(AbstractExternalizable.java:
139)
     [java]     at
java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
     [java]     at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
     [java]     at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
     [java]     at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
     [java]     at
com..aliasi.util.AbstractExternalizable.compile(AbstractExternalizable.java:348)
     [java]     at ChineseTokens05.compileSpellChecker(ChineseTokens05.java:132)
     [java]     at ChineseTokens05.run(ChineseTokens05.java:98)
     [java]     at ChineseTokens05.main(ChineseTokens05.java:243)
 
BUILD SUCCESSFUL

Any suggestion on this error message?  Does it mean the program can't load the
CompiledSpellChecker from memory? I tried to load like this:

File modelFile
            = new File("C:\\LanProcessing\\lingpipe-3.6.0\\demos\\models\\"+
                       "words-zh-" + "as" + ".CompiledSpellChecker");
        System.out.println("Reading model file=" + modelFile);
        FileInputStream fIn = new FileInputStream(modelFile);
        ObjectInputStream objIn = new ObjectInputStream(fIn);
  mSpellChecker = (CompiledSpellChecker) objIn.readObject();

It still has the same null pointer exception.

thanks,
Sue




[Non-text portions of this message have been removed]




Wed Nov 12, 2008 8:21 pm

suelingpipe
Offline Offline
Send Email Send Email

Forward
Message #641 of 777 |
Expand Messages Author Sort by Date

I recently downloaded LingPipe 3.6.0 and tried the ChineseToken tutorial sample.  I always got NullPointerException. My environment is: - Window XP - Java...
Sue Chen
suelingpipe
Offline Send Email
Nov 12, 2008
8:21 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help