shalmaneser 1.2.0.rc4 → 1.2.rc5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +47 -18
- data/bin/shalmaneser +8 -2
- data/doc/index.md +1 -0
- data/lib/shalmaneser/opt_parser.rb +68 -67
- metadata +49 -119
- data/bin/fred +0 -16
- data/bin/frprep +0 -34
- data/bin/rosy +0 -17
- data/lib/common/AbstractSynInterface.rb +0 -1229
- data/lib/common/Counter.rb +0 -18
- data/lib/common/EnduserMode.rb +0 -27
- data/lib/common/Eval.rb +0 -480
- data/lib/common/FixSynSemMapping.rb +0 -196
- data/lib/common/Graph.rb +0 -345
- data/lib/common/ISO-8859-1.rb +0 -24
- data/lib/common/ML.rb +0 -186
- data/lib/common/Mallet.rb +0 -236
- data/lib/common/Maxent.rb +0 -229
- data/lib/common/Optimise.rb +0 -195
- data/lib/common/Parser.rb +0 -213
- data/lib/common/RegXML.rb +0 -269
- data/lib/common/RosyConventions.rb +0 -171
- data/lib/common/STXmlTerminalOrder.rb +0 -194
- data/lib/common/SalsaTigerRegXML.rb +0 -2347
- data/lib/common/SalsaTigerXMLHelper.rb +0 -99
- data/lib/common/SynInterfaces.rb +0 -282
- data/lib/common/TabFormat.rb +0 -721
- data/lib/common/Tiger.rb +0 -1448
- data/lib/common/Timbl.rb +0 -144
- data/lib/common/Tree.rb +0 -61
- data/lib/common/config_data.rb +0 -470
- data/lib/common/config_format_element.rb +0 -220
- data/lib/common/headz.rb +0 -338
- data/lib/common/option_parser.rb +0 -13
- data/lib/common/prep_config_data.rb +0 -62
- data/lib/common/prep_helper.rb +0 -1330
- data/lib/common/ruby_class_extensions.rb +0 -310
- data/lib/db/db_interface.rb +0 -48
- data/lib/db/db_mysql.rb +0 -145
- data/lib/db/db_sqlite.rb +0 -280
- data/lib/db/db_table.rb +0 -239
- data/lib/db/db_wrapper.rb +0 -176
- data/lib/db/sql_query.rb +0 -243
- data/lib/ext/maxent/Classify.class +0 -0
- data/lib/ext/maxent/Train.class +0 -0
- data/lib/fred/Baseline.rb +0 -150
- data/lib/fred/FileZipped.rb +0 -31
- data/lib/fred/FredBOWContext.rb +0 -877
- data/lib/fred/FredConventions.rb +0 -232
- data/lib/fred/FredDetermineTargets.rb +0 -319
- data/lib/fred/FredEval.rb +0 -312
- data/lib/fred/FredFeatureExtractors.rb +0 -322
- data/lib/fred/FredFeatures.rb +0 -1061
- data/lib/fred/FredFeaturize.rb +0 -602
- data/lib/fred/FredNumTrainingSenses.rb +0 -27
- data/lib/fred/FredParameters.rb +0 -402
- data/lib/fred/FredSplit.rb +0 -84
- data/lib/fred/FredSplitPkg.rb +0 -180
- data/lib/fred/FredTest.rb +0 -606
- data/lib/fred/FredTrain.rb +0 -144
- data/lib/fred/PlotAndREval.rb +0 -480
- data/lib/fred/fred.rb +0 -47
- data/lib/fred/fred_config_data.rb +0 -185
- data/lib/fred/md5.rb +0 -23
- data/lib/fred/opt_parser.rb +0 -250
- data/lib/frprep/Ampersand.rb +0 -39
- data/lib/frprep/CollinsInterface.rb +0 -1165
- data/lib/frprep/Counter.rb +0 -18
- data/lib/frprep/FNCorpusXML.rb +0 -643
- data/lib/frprep/FNDatabase.rb +0 -144
- data/lib/frprep/FrameXML.rb +0 -513
- data/lib/frprep/Graph.rb +0 -345
- data/lib/frprep/MiniparInterface.rb +0 -1388
- data/lib/frprep/RegXML.rb +0 -269
- data/lib/frprep/STXmlTerminalOrder.rb +0 -194
- data/lib/frprep/SleepyInterface.rb +0 -384
- data/lib/frprep/TntInterface.rb +0 -44
- data/lib/frprep/TreetaggerInterface.rb +0 -327
- data/lib/frprep/do_parses.rb +0 -143
- data/lib/frprep/frprep.rb +0 -693
- data/lib/frprep/interfaces/berkeley_interface.rb +0 -372
- data/lib/frprep/interfaces/stanford_interface.rb +0 -353
- data/lib/frprep/interpreters/berkeley_interpreter.rb +0 -22
- data/lib/frprep/interpreters/stanford_interpreter.rb +0 -22
- data/lib/frprep/one_parsed_file.rb +0 -28
- data/lib/frprep/opt_parser.rb +0 -94
- data/lib/frprep/ruby_class_extensions.rb +0 -310
- data/lib/rosy/AbstractFeatureAndExternal.rb +0 -242
- data/lib/rosy/ExternalConfigData.rb +0 -58
- data/lib/rosy/FailedParses.rb +0 -130
- data/lib/rosy/FeatureInfo.rb +0 -242
- data/lib/rosy/GfInduce.rb +0 -1115
- data/lib/rosy/GfInduceFeature.rb +0 -148
- data/lib/rosy/InputData.rb +0 -294
- data/lib/rosy/RosyConfusability.rb +0 -338
- data/lib/rosy/RosyEval.rb +0 -465
- data/lib/rosy/RosyFeatureExtractors.rb +0 -1609
- data/lib/rosy/RosyFeaturize.rb +0 -281
- data/lib/rosy/RosyInspect.rb +0 -336
- data/lib/rosy/RosyIterator.rb +0 -478
- data/lib/rosy/RosyPhase2FeatureExtractors.rb +0 -230
- data/lib/rosy/RosyPruning.rb +0 -165
- data/lib/rosy/RosyServices.rb +0 -744
- data/lib/rosy/RosySplit.rb +0 -232
- data/lib/rosy/RosyTask.rb +0 -19
- data/lib/rosy/RosyTest.rb +0 -829
- data/lib/rosy/RosyTrain.rb +0 -234
- data/lib/rosy/RosyTrainingTestTable.rb +0 -787
- data/lib/rosy/TargetsMostFrequentFrame.rb +0 -60
- data/lib/rosy/View.rb +0 -418
- data/lib/rosy/opt_parser.rb +0 -379
- data/lib/rosy/rosy.rb +0 -78
- data/lib/rosy/rosy_config_data.rb +0 -121
- data/lib/shalmaneser/version.rb +0 -3
@@ -1,121 +0,0 @@
|
|
1
|
-
require 'common/config_data'
|
2
|
-
|
3
|
-
##############################
|
4
|
-
# Class RosyConfigData
|
5
|
-
#
|
6
|
-
# inherits from ConfigData,
|
7
|
-
# sets features for ROSY
|
8
|
-
|
9
|
-
class RosyConfigData < ConfigData
|
10
|
-
CONFIG_DEFS = { # features
|
11
|
-
"feature" => "list",
|
12
|
-
"classifier" => "list",
|
13
|
-
|
14
|
-
"verbose" => "bool" ,
|
15
|
-
"enduser_mode" => "bool",
|
16
|
-
|
17
|
-
"experiment_ID" => "string",
|
18
|
-
|
19
|
-
"directory_input_train" => "string",
|
20
|
-
"directory_input_test" => "string",
|
21
|
-
"directory_output" => "string",
|
22
|
-
|
23
|
-
"preproc_descr_file_train" => "string",
|
24
|
-
"preproc_descr_file_test" => "string",
|
25
|
-
"external_descr_file" => "string",
|
26
|
-
|
27
|
-
"dbtype" => "string", # "mysql" or "sqlite"
|
28
|
-
|
29
|
-
"host" => "string", # DB access: sqlite only
|
30
|
-
"user" => "string",
|
31
|
-
"passwd" => "string",
|
32
|
-
"dbname" => "string",
|
33
|
-
|
34
|
-
"data_dir" => "string", # for external use
|
35
|
-
"rosy_dir" => "pattern", # for internal use only, set by rosy.rb
|
36
|
-
|
37
|
-
"classifier_dir" => "string", # if present, special directory for classifiers
|
38
|
-
|
39
|
-
"classif_column_name" => "string",
|
40
|
-
"main_table_name" => "pattern",
|
41
|
-
"test_table_name" => "pattern",
|
42
|
-
|
43
|
-
"eval_file" => "pattern",
|
44
|
-
"log_file" => "pattern",
|
45
|
-
"failed_file" => "pattern",
|
46
|
-
"classifier_file" => "pattern",
|
47
|
-
"classifier_output_file" => "pattern",
|
48
|
-
"noval" => "string",
|
49
|
-
|
50
|
-
|
51
|
-
"split_nones" => "bool",
|
52
|
-
"print_eval_log" => "bool",
|
53
|
-
"assume_argrec_perfect" => "bool",
|
54
|
-
"xwise_argrec" => "string",
|
55
|
-
"xwise_arglab" => "string",
|
56
|
-
"xwise_onestep" => "string",
|
57
|
-
|
58
|
-
"fe_syn_repair" => "bool", # map words to constituents for FEs: idealize?
|
59
|
-
"fe_rel_repair" => "bool", # FEs: include non-included relative clauses into FEs
|
60
|
-
"prune" => "string", # pruning prior to argrec?
|
61
|
-
|
62
|
-
# Imported from PrepConfigData
|
63
|
-
'do_postag' => 'bool',
|
64
|
-
'do_lemmatize' => 'bool',
|
65
|
-
'do_parse' => 'bool',
|
66
|
-
'pos_tagger' => 'string',
|
67
|
-
'lemmatizer' => 'string',
|
68
|
-
'parser' => 'string'
|
69
|
-
}
|
70
|
-
|
71
|
-
def initialize(filename)
|
72
|
-
super(filename, CONFIG_DEFS, ["exp_ID", "test_ID", "split_ID",
|
73
|
-
"feature_name", "classif", "step",
|
74
|
-
"group", "dataset","mode"])
|
75
|
-
|
76
|
-
# set access functions for list features
|
77
|
-
set_list_feature_access("feature",
|
78
|
-
method("access_feature"))
|
79
|
-
|
80
|
-
# set access functions for list features
|
81
|
-
set_list_feature_access("classifier",
|
82
|
-
method("access_feature"))
|
83
|
-
|
84
|
-
end
|
85
|
-
|
86
|
-
###
|
87
|
-
# protected
|
88
|
-
|
89
|
-
#####
|
90
|
-
# access_feature
|
91
|
-
#
|
92
|
-
# access function for feature 'feature'
|
93
|
-
#
|
94
|
-
# assumed format in the config file:
|
95
|
-
#
|
96
|
-
# feature = path [option]*
|
97
|
-
#
|
98
|
-
# i.e. first the name of the feature type to use, then
|
99
|
-
# optionally options associated with that feature,
|
100
|
-
# e.g. 'argrec': use that feature only when computing argrec
|
101
|
-
#
|
102
|
-
# the access function is called with parameter val_list, an array of
|
103
|
-
# string tuples, one string tuple for each feature defined.
|
104
|
-
# the first string in the tuple is the feature name, the rest are the options
|
105
|
-
#
|
106
|
-
# returns: a list of pairs [feature_name(string), options(array:string)]
|
107
|
-
# of defined features
|
108
|
-
def access_feature(val_list) # array:array:string: list of tuples defined in config file
|
109
|
-
# for feature 'feature'
|
110
|
-
if val_list.nil?
|
111
|
-
[]
|
112
|
-
else
|
113
|
-
val_list.map do |feature_descr_tuple|
|
114
|
-
[feature_descr_tuple.first, feature_descr_tuple[1..-1]]
|
115
|
-
end
|
116
|
-
end
|
117
|
-
end
|
118
|
-
end
|
119
|
-
|
120
|
-
|
121
|
-
|
data/lib/shalmaneser/version.rb
DELETED