First of all: thank you for making this software publicly available! I really
appreciate it ;)
Now that you provide two different types of language profiles (based on
wikipedia and twitter, respectively), I'd like to be able to keep two language
detectors alive simultaneously. One relying on the twitter profiles for
classifying short texts, and one relying on the wikipedia profiles for
classifying long ones (this is somewhat related to issue 25). However, the
current implementation of the DetectorFactory does not allow me to set up more
than one type of Detector.
I'd like to be able to do something similar to the following (where
detectorShort and detectorLong would use language profiles for (approximately)
the same languages, originating from different sources):
// set-up two different detectors
DetectorFactory.loadProfiles(LanguageProfile.SHORT_TEXTS,
"/path/to/shorttextprofiles");
DetectorFactory.loadProfiles(LanguageProfile.LONG_TEXTS,
"/path/to/longtextprofiles");
...
// get the detector for handling short texts
Detector detectorShort = DetectorFactory.create(LanguageProfile.SHORT_TEXTS);
// get the detector for handling longer texts
Detector detectorLong = DetectorFactory.create(LanguageProfile.LONG_TEXTS);
...
Is this behaviour something you would consider in a future release?
Kind regards
Original issue reported on code.google.com by fredrik....@gmail.com on 15 Mar 2012 at 6:44
Original issue reported on code.google.com by
fredrik....@gmail.com
on 15 Mar 2012 at 6:44