LemmaStatisticsService
in package
Service for lemma statistics and cleanup operations.
Tags
Table of Contents
Methods
- clearLemmas() : int
- Clear all lemmas for a language.
- getLemmaAggregateStats() : array{total_lemmas: int, single_form: int, multi_form: int, avg_forms_per_lemma: float, status_distribution: array}
- Get aggregate lemma statistics for a language.
- getLemmaStatistics() : array{total_terms: int, with_lemma: int, without_lemma: int, unique_lemmas: int}
- Get lemma statistics for a language.
- getUnmatchedStatistics() : array{unmatched_count: int, unique_words: int, matchable_by_lemma: int}
- Get statistics about unmatched text items that could benefit from lemma linking.
Methods
clearLemmas()
Clear all lemmas for a language.
public
clearLemmas(int $languageId) : int
Parameters
- $languageId : int
-
Language ID
Return values
int —Number of terms affected
getLemmaAggregateStats()
Get aggregate lemma statistics for a language.
public
getLemmaAggregateStats(int $languageId) : array{total_lemmas: int, single_form: int, multi_form: int, avg_forms_per_lemma: float, status_distribution: array}
Parameters
- $languageId : int
-
Language ID
Return values
array{total_lemmas: int, single_form: int, multi_form: int, avg_forms_per_lemma: float, status_distribution: array}getLemmaStatistics()
Get lemma statistics for a language.
public
getLemmaStatistics(int $languageId) : array{total_terms: int, with_lemma: int, without_lemma: int, unique_lemmas: int}
Parameters
- $languageId : int
-
Language ID
Return values
array{total_terms: int, with_lemma: int, without_lemma: int, unique_lemmas: int}getUnmatchedStatistics()
Get statistics about unmatched text items that could benefit from lemma linking.
public
getUnmatchedStatistics(int $languageId) : array{unmatched_count: int, unique_words: int, matchable_by_lemma: int}
Parameters
- $languageId : int
-
Language ID