Incompatible with opennlp1.5

Bug #667949 reported by Sandeep
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
RelEx
Fix Released
Medium
linas

Bug Description

Trying to compile relex with Opennlp tool version 1.5.0 throws following errors

    [javac] /Users/smane/Documents/Software/relex-1.3.0/src/java/relex/corpus/DocSplitterOpenNLPImpl.java:109: cannot find symbol
    [javac] symbol : class SentenceDetector
    [javac] location: package opennlp.tools.lang.english
    [javac] detector = new opennlp.tools.lang.english.SentenceDetector(englishModelFilename);
    [javac] ^
    [javac] /Users/smane/Documents/Software/relex-1.3.0/src/java/relex/corpus/DocSplitterOpenNLPImpl.java:186: incompatible types
    [javac] found : opennlp.tools.util.Span[]
    [javac] required: int[]
    [javac] int[] sentenceEnds = detector.sentPosDetect(buffer);
    [javac] ^
    [javac] /Users/smane/Documents/Software/relex-1.3.0/src/java/relex/corpus/DocSplitterOpenNLPImpl.java:246: incompatible types
    [javac] found : opennlp.tools.util.Span[]
    [javac] required: int[]
    [javac] int[] sentenceEnds = detector.sentPosDetect(docText);
    [javac] ^
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] 3 errors

Workaround: Use opennlp version 1.3.0

Revision history for this message
Stephen Gear (oobetatestoo) wrote : UNSUBSCRIBE

UNSUBSCRIBE

Revision history for this message
linas (linasvepstas) wrote :

Yes, I tried this too, and failed. <rant>Not happy that they changed the API :-( I lost this evening trying to figure out how to use their new API, but its wildly under-documented, so I was mostly trying to guess what the right thing to do was, and failed.</rant>

Anyway, relex will work just fine without opennlp; it will fall back to the default Java sentence detector, and honestly, I am not sure its any worse ... and in some cases, it's better. I have not seen any accuracy metric to justify using the one over the other.

Changed in relex:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → linas (linasvepstas)
Revision history for this message
linas (linasvepstas) wrote :

I've finally gotten around to implementing opennlp-1.5 support; sources have been pushed to the bzr tree, and I will package up a new relex release "real soon now".

Changed in relex:
status: Confirmed → Fix Committed
Revision history for this message
linas (linasvepstas) wrote :

Fix for this is in released version relex-1.3.1

Changed in relex:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.