/** * Counts the number of {@link Sense} instances within the UBY-LMF {@link LexicalResource} * contained in the database accessed by this {@link UbyStatistics} instance. * * @return the number of senses in the lexical resource or zero if the * lexical resource does not contain any senses */ public long countSenses(){ return countClassEntities(Sense.class); }
/** * Count the number of lemma+pos combinations per lexicon, * part-of-speech prefix * and language * @param lexiconName * Name of the lexicon * @param prefix * The partOfSpeech prefix * @param lang * The language identifier of the lexicon * @return the number of lemma+pos combinations */ public long countLemmaPosPerLexiconAndPosPrefixAndLanguage(String lexiconName, String prefix, String lang){ Set<String> l= getLemmaPosPerLexiconAndPosPrefixAndLanguage(lexiconName, prefix, lang); int res = 0; if (!l.isEmpty()){ res = l.size(); } return res; }
Set<String> l = getLemmaPosPerLexicon(lexiconName); int res = 0; if (!l.isEmpty()){
/** * Counts the number of {@link LexicalEntry} instances within the UBY-LMF {@link LexicalResource} * contained in the database accessed by this {@link UbyStatistics} instance. * * @return the number of lexical entries in the lexical resource or zero if the * lexical resource does not contain any lexical entries */ public long countLexicalEntries(){ return countClassEntities(LexicalEntry.class); }
/** * Counts the number of {@link SenseAxis} instances within the UBY-LMF {@link LexicalResource} * contained in the database accessed by this {@link UbyStatistics} instance. * * @return the number of sense axes in the lexical resource or zero if the * lexical resource does not contain any sense axes */ public long countSenseAxes() { return countClassEntities(SenseAxis.class); }