ENIAMsemTypes.ml
2.88 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
(*
* ENIAMsemantics implements semantic processing for ENIAM
* Copyright (C) 2016-2017 Wojciech Jaworski <wjaworski atSPAMfree mimuw dot edu dot pl>
* Copyright (C) 2016-2017 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/>.
*)
type node = {
orth: string;
lemma: string;
pos: string;
weight: float;
id: int;
symbol: linear_term;
arg_symbol: linear_term;
arg_dir: string;
(*agf: ENIAMwalTypes.gf;
amorf: ENIAMwalTypes.morf;
arole: string;
arole_attr: string;
meaning: string;
hipero: StringSet.t;
meaning_weight: float;
position: ENIAMwalTypes.schema_field;*)
attrs: (string * linear_term) list;
args: linear_term;
gf: string;
role: string;
role_attr: string;
selprefs: linear_term;
meaning: linear_term;
arole: string;
arole_attr: string;
arev: bool;
sem_args: linear_term;
}
and concept =
{c_sense: linear_term; c_name: linear_term; (*c_visible_var: bool;*) c_quant: linear_term; c_local_quant: bool;
(*c_modalities: (string * type_term) list;*)
c_relations: linear_term; c_variable: (string * string); c_pos: int; c_cat: linear_term; c_proj: linear_term}
and context =
{cx_sense: linear_term; cx_contents: linear_term; cx_relations: linear_term; cx_variable: (string * string); cx_pos: int}
and linear_term =
Tuple of linear_term list
| Variant of string * (string * linear_term) list (* etykieta * indeks * term *)
| Dot
| Val of string
| Node of node
| Concept of concept
| Context of context
| Relation of string * string * linear_term (* role * role_attr * concept *)
| RevRelation of string * string * linear_term (* role * role_attr * concept *)
| SingleRelation of linear_term
| TripleRelation of string * string * linear_term * linear_term (* role * role_attr * concept *)
| AddRelation of linear_term * string * string * linear_term (* nadrządnik * role * role_attr * podrzędnik *)
| RemoveRelation of string * string * linear_term
| SetContextName of linear_term * linear_term (* meaning * concept *)
| MakeTripleRelation of string * string * linear_term (* role * role_attr * concept *)
| ManageCoordination of node * linear_term
| Ref of int
let sem_lexicon_filename = ENIAMwalTypes.resource_path ^ "/semantics/lexicon-pl.dic"