annif.analyzer.simple   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A SimpleAnalyzer.__init__() 0 3 1
A SimpleAnalyzer._normalize_word() 0 2 1
1
"""Simple analyzer for Annif. Only folds words to lower case."""
2
3
from __future__ import annotations
4
5
from . import analyzer
6
7
8
class SimpleAnalyzer(analyzer.Analyzer):
9
    name = "simple"
10
11
    def __init__(self, param: None, **kwargs) -> None:
12
        self.param = param
13
        super().__init__(**kwargs)
14
15
    def _normalize_word(self, word: str) -> str:
16
        return word.lower()
17