-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
31 lines (27 loc) · 1.09 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import logging
from wikibaseintegrator.wbi_config import config as wbi_config
from src.console import console
from src.models.combinator import Combinator
import config as config
wbi_config["USER_AGENT"] = "lexeme-combinator"
logging.basicConfig(level=config.loglevel)
logger = logging.getLogger(__name__)
if __name__ == "__main__":
console.print(
"Note: currently we only support lexemes "
"combined by exactly two other lexemes.\n"
"We don't support creating new lexemes so "
f"if you are missing a lexeme, go to {config.ordia_url}.\n"
f"We look for lexemes with lemmas that contain "
f"a minimum of {config.minimum_lemma_characters} characters"
)
comb = Combinator(lang=config.language_code)
comb.start()
# # fetch lexemes without combines
# comb.fetch_lexemes_without_combines()
# console.print(comb.sparql_result)
# comb.parse_sparql_result_into_lexemes()
# # query for words they could consist of aka partwords
# comb.iterate_lexemes()
# # find the longest partword that match the start of the lemma
# # print