Skip to content

Commit

Permalink
FIX Corrected a small typo in a semantic parser feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-martins committed May 15, 2014
1 parent 10f2f1a commit 78c37cd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion scripts/train_test_tagger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ mkdir -p ${path_results}
# Set file paths. Allow multiple test files.
file_model=${path_models}/${language}_${suffix}.model
file_train=${path_data}/${language}_train.conll.tagging
if [ "$language" == "english_proj" ]
if [ "$language" == "english_proj" ] || [ "$language" == "spanish_ancora" ] || [ "$language" == "spanish_ancora_nomwe_auto" ]
then
files_test[0]=${path_data}/${language}_test.conll.tagging
files_test[1]=${path_data}/${language}_dev.conll.tagging
Expand Down
15 changes: 8 additions & 7 deletions scripts_srl/train_test_semantic_parser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ test=true
prune=true # This will revert to false if model_type=basic.
prune_labels=true
prune_distances=true
train_external_pruner=true # If true, the pruner is trained separately.
trained_external_pruner=true #false # If true, loads the external pruner.
train_external_pruner=false # If true, the pruner is trained separately.
trained_external_pruner=false # If true, loads the external pruner.
posterior_threshold=0.0001 # Posterior probability threshold for the pruner.
pruner_max_arguments=20 #10 # Maximum number of candidate heads allowed by the pruner.
labeled=true # Output semantic labels.
Expand Down Expand Up @@ -84,10 +84,11 @@ if [ "$language" == "english" ]
then
if [ "$file_format" == "sdp" ]
then
#file_train=${path_data}/${formalism}_augmented_train+dev0.sdp
file_train=${path_data}/${formalism}_augmented_train+dev0+dev.sdp
file_train=${path_data}/${formalism}_augmented_train+dev0.sdp
#file_train=${path_data}/${formalism}_augmented_train+dev0+dev.sdp
files_test[0]=${path_data}/${formalism}_augmented_dev.sdp
files_test[1]=${path_data}/${formalism}_augmented_test_blind.sdp
files_test[1]=${path_data}/${formalism}_augmented_test.sdp
#files_test[1]=${path_data}/${formalism}_augmented_test_blind.sdp
#files_test[1]=${path_data}/${formalism}_augmented_train+dev0.sdp
#files_test[0]=${path_data}/${formalism}_augmented_dev0.sdp
#files_test[1]=${path_data}/${formalism}_augmented_dev.sdp
Expand Down Expand Up @@ -171,7 +172,7 @@ then
if [ "$file_format" == "sdp" ]
then
python remove_augmented.py ${file_pruner_prediction} > ${file_pruner_prediction}.unaugmented
sh evaluator/run.sh Evaluator ${file_test}.unaugmented ${file_pruner_prediction}.unaugmented \
sh evaluator/run.sh Scorer ${file_test}.unaugmented ${file_pruner_prediction}.unaugmented \
>> ${file_pruner_results}
cat ${file_pruner_results}
else
Expand Down Expand Up @@ -289,7 +290,7 @@ then
if [ "$file_format" == "sdp" ]
then
python remove_augmented.py ${file_prediction} > ${file_prediction}.unaugmented
sh evaluator/run.sh Evaluator ${file_test}.unaugmented ${file_prediction}.unaugmented \
sh evaluator/run.sh Scorer ${file_test}.unaugmented ${file_prediction}.unaugmented \
>> ${file_results}
cat ${file_results}
else
Expand Down
1 change: 0 additions & 1 deletion src/parser/DependencyReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
using namespace std;

Instance *DependencyReader::GetNext() {
CHECK(false);
// Fill all fields for the entire sentence.
vector<vector<string> > sentence_fields;
string line;
Expand Down
2 changes: 1 addition & 1 deletion src/semantic_parser/SemanticFeatures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2084,7 +2084,7 @@ void SemanticFeatures::AddPredicateFeatures(SemanticInstanceNumeric* sentence,
AddFeature(fkey, features);
fkey = encoder_.CreateFKey_WP(SemanticFeatureTemplatePredicate::HW_bdHP, flags, HWID, bdHPID);
AddFeature(fkey, features);
fkey = encoder_.CreateFKey_WP(SemanticFeatureTemplatePredicate::HW_bdHR, flags, HWID, bdHPID);
fkey = encoder_.CreateFKey_WP(SemanticFeatureTemplatePredicate::HW_bdHR, flags, HWID, bdHRID);
AddFeature(fkey, features);
fkey = encoder_.CreateFKey_WP(SemanticFeatureTemplatePredicate::HP_bdHW, flags, bdHWID, HPID);
AddFeature(fkey, features);
Expand Down

0 comments on commit 78c37cd

Please sign in to comment.