-
Notifications
You must be signed in to change notification settings - Fork 14
/
sanity_check_Readme.txt
84 lines (65 loc) · 1.99 KB
/
sanity_check_Readme.txt
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
72
73
74
75
76
77
78
79
80
81
82
83
84
Sanity check
The approach is to create keywords and compare them with the ones kea has generated.
This is for Windows. If you are under Unix, you should use ./sanity_check_files.py
Prequisites:
1. Training has taken place and a model is generated. e.g.
java kea.main.KEAModelBuilder -d -l testdocs/en/train/ -m my_model -v none -f skos
You can extract keyphrases for some test documents given this model:
java kea.main.KEAKeyphraseExtractor -l testdocs/en/test -m my_model -v none -f text
Steps:
- create a folder in KEAHOME directory (e.g. KEAHOME\my_testing)
- select and copy a subset of test documents from KEAHOME\testdocs to KEAHOME\my_testing
- copy sanity_check.py into KEAHOME
- perform the check by typing command below:
python sanity_check.py <port> <folder> <model>
e.g.
python sanity_check.py 8090 my_testing mymodel
With two documents as input you get the following output from sanity_chek.py
current file is: E:\tmp\kea-5.0_full\my_testing\gtz_g24ine.txt
================================================================
'animal-powered mills'
'power gears'
Animal-Powered
'grinding unit'
grinding
gears
Mills
'motor mill'
FCFA
'draft animals'
contents of corresponding .key file E:\tmp\kea-5.0_full\my_testing\gtz_g24ine.key from KEA.
........................................................................
animal-powered mills
power gears
Animal-Powered
grinding unit
grinding
gears
Mills
motor mill
FCFA
draft animals
current file is: E:\tmp\kea-5.0_full\my_testing\iirr_ii02re.txt
================================================================
upland
Agroforestry
Homegardens
hedgerows
'agroforestry systems'
biophysical
Trees
'Research and extension'
Forestry
'farm households'
contents of corresponding .key file E:\tmp\kea-5.0_full\my_testing\iirr_ii02re.key from KEA.
........................................................................
upland
Agroforestry
Homegardens
hedgerows
agroforestry systems
biophysical
Trees
Research and extension
Forestry
farm households