ENIAMlexSemanticsTypes.ml
3.42 KB
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
(*
* ENIAMlexSemantics is a library that assigns tokens with lexicosemantic information.
* Copyright (C) 2016 Wojciech Jaworski <wjaworski atSPAMfree mimuw dot edu dot pl>
* Copyright (C) 2016 Institute of Computer Science Polish Academy of Sciences
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*)
open ENIAMtokenizerTypes
open Xstd
(* FIXME: usunąć *)
type labels = {
number: string;
case: string;
gender: string;
person: string;
aspect: string;
}
type semantics =
Normal
| Special of string list
(* | SpecialNoun of type_arg list * type_term
| SpecialMod of string * (type_arg list * type_term)*)
| PrepSemantics of (string * string * string * StringSet.t * string list) list (* case,role,role_attr,hipero,sel_prefs *)
(* FIXME: usunąć *)
type categories = {lemma: string; pos: string; pos2: string;
numbers: string list; cases: string list; genders: string list; persons: string list;
grads: string list; praeps: string list; acms: string list;
aspects: string list; negations: string list; moods: string list; tenses: string list;
nsyn: string list; nsem: string list;
}
type lex_sem = {
e: labels;
valence: (int * ENIAMwalTypes.frame) list;
simple_valence: (int * ENIAMwalTypes.frame) list;
very_simple_valence: ((ENIAM_LCGgrammarPLtypes.cat * ENIAM_LCGgrammarPLtypes.selector_relation * string list) list * ENIAM_LCGtypes.grammar_symbol) list;
senses: (string * string list * float) list;
lroles: string * string;
semantics: semantics;
cats: categories list;
}
let empty_labels = {
number="";
case="";
gender="";
person="";
aspect="";
}
let empty_lex_sem = {
e=empty_labels; valence=[]; simple_valence=[]; very_simple_valence=[]; senses=[];
lroles="",""; semantics=Normal; cats=[];}
(* FIXME: poprawić katalog *)
(*let subst_uncountable_lexemes_filename = resource_path ^ "/lexSemantics/subst_uncountable.dat"
let subst_uncountable_lexemes_filename2 = resource_path ^ "/lexSemantics/subst_uncountable_stare.dat"
let subst_container_lexemes_filename = resource_path ^ "/lexSemantics/subst_container.dat"
let subst_numeral_lexemes_filename = resource_path ^ "/lexSemantics/subst_numeral.dat"
let subst_time_lexemes_filename = resource_path ^ "/lexSemantics/subst_time.dat"*)
let subst_uncountable_lexemes_filename = resource_path ^ "/Walenty/subst_uncountable.dat"
let subst_uncountable_lexemes_filename2 = resource_path ^ "/Walenty/subst_uncountable_stare.dat"
let subst_container_lexemes_filename = resource_path ^ "/Walenty/subst_container.dat"
let subst_numeral_lexemes_filename = resource_path ^ "/Walenty/subst_numeral.dat"
let subst_time_lexemes_filename = resource_path ^ "/Walenty/subst_time.dat"
let proper_names_filename = resource_path ^ "/lexSemantics/proper_names_sgjp_polimorf.tab"
let proper_names_filename2 = resource_path ^ "/lexSemantics/proper_names.tab"