Changeset 33698 for other-projects/maori-lang-detection/src/org/greenstone/atea/TextLanguageDetector.java
- Timestamp:
- 2019-11-15T23:14:48+13:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/maori-lang-detection/src/org/greenstone/atea/TextLanguageDetector.java
r33674 r33698 53 53 */ 54 54 public final double MINIMUM_CONFIDENCE; 55 56 /** Number of language and confidence results to return for storing in MongoDB57 * MongoDB runs out of space if storing too many, as we store this info per sentence58 * and a long text document becomes a very large MongoDB document presumable*/59 public final int NUM_TOP_LANGUAGES = 5; // 103 max, in current version of opennlp lang model60 55 61 56 /** silentMode set to false means TextLanguageDetector won't print helpful messages while running. Set to true to run silently. */ … … 162 157 } 163 158 164 public ArrayList<SentenceInfo> getAllSentencesInfo(String[] sentences ) {159 public ArrayList<SentenceInfo> getAllSentencesInfo(String[] sentences, int NUM_TOP_LANGUAGES) { 165 160 166 161 if(sentences == null) { … … 194 189 } 195 190 196 public ArrayList<SentenceInfo> getAllOverlappingSentencesInfo(String[] sentences ) {191 public ArrayList<SentenceInfo> getAllOverlappingSentencesInfo(String[] sentences, int NUM_TOP_LANGUAGES) { 197 192 198 193 if(sentences == null) {
Note:
See TracChangeset
for help on using the changeset viewer.