forked from dweiss/compound-splitter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
71 lines (42 loc) · 1.75 KB
/
README
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
GERMAN COMPOUND SPLITTER
========================
Based on a greedy "detach word-by-word" heuristic.
PLEASE HELP WITH TEST CASES
===========================
They're much appreciated and needed. A list of test splits is in:
src/test/resources/test-compounds.utf8
It is a plain text file with a single compound on each line. For example:
lerneffekt lern.effekt
means "lerneffekt" should be split into "lern" and "effekt". Whenever there are glue
morphemes, they are omitted in the split hint, as in here:
anwendungsprogrammschnittstelle anwendung.programm.schnittstelle
If there are more than one possible splits (ambiguity), they are comma-separated as in:
sünderecke sünde.recke,sünder.ecke
Add as many test cases as you want. Run them with:
mvn test
This launches a TestNG data-driven test suite.
COMPILING DICTIONARIES
======================
A finite state automaton is created from:
src/data/morphy.txt (surface lemma POS_TAG)
src/data/morphy-unknown.txt (surface lemma POS_TAG)
You can add new words to morphy-unknown.txt and recompile the automaton with:
mvn -Pfst
The result is in src/main/resources/words.fst. You'll need to refresh your IDE to pick up
the changes.
TODO: PREFIXES
==============
We need to think if "fixed" prefixes are indeed useful and should be detached/ removed
in the initial stages of processing. Daniel came up with a list that I stored here:
src/data/compound-prefixes.txt
It is temporarily not used because I've tried this, for example:
$ grep -i "^abbrenn" ./consolidated.bycount
abbrennen 4063
abbrennt 713
abbrennens 131
abbrennenden 80
abbrennende 62
abbrennung 56
abbrenne 45
this is Google 1-gram corpus from 1980-200(7?) and it is clear that this prefix is not a compound
forming one at all.