简体   繁体   中英

Porter2 Stemming Java Implementation Inquiry

I've seen other posts about this but I still couldn't get it to work.

http://snowball.tartarus.org/dist/libstemmer_java.tgz <<- this contains the java implementation of the porter2 algorithm.

What I did was extract the contents on my desktop (for easy access) and opened its .java file using Netbeans IDE. I ran it but it returned an error.

Netbeans doesn't read the other java files. Since all the java files are connected to each other, one error from javaX file produces error on javaY file and so on.

TestApp.java is the one which should be ran. But the following errors occur. See the screenshots.

Here are the screenshots:

http://img248.imageshack.us/img248/290/java1.jpg

http://img4.imageshack.us/img4/5196/java2l.jpg

http://img441.imageshack.us/img441/8625/java3i.jpg

I cannot see your images any longer. The ext folder will not compile because of 3 unreachable statements in frenchStemmer.java. They can easily be removed, or just delete the entire file if you are not using french.

case 13:
                        // (, line 155
                        // call RV, line 155
                        if (!r_RV())
                        {
                            return false;
                        }
                        // fail, line 155
                        // (, line 155
                        // <-, line 155
                        slice_from("ant");
                        return false;
                        break;                 <<<- remove this

I compiled and ran in the free Community Edition of Intellij, and also using the command line.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM