Skip to content

Commit

Permalink
FIX Made the SemanticWriter preserve comment lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
André T. Martins committed Jan 4, 2015
1 parent e4c6ce0 commit 894c250
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts_srl/train_test_semantic_parser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test=true
prune=true # This will revert to false if model_type=basic.
prune_labels=true
prune_distances=true
train_external_pruner=true #false # If true, the pruner is trained separately.
train_external_pruner=false # If true, the pruner is trained separately.
trained_external_pruner=true #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.
Expand Down
2 changes: 1 addition & 1 deletion scripts_srl/train_test_submission_SDP2015.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
model_type=af #basic #af+as+cs+gp+cp+ccp
model_type=af+as+cs #basic #af+as+cs+gp+cp+ccp

language=czech
open=false
Expand Down
6 changes: 5 additions & 1 deletion src/semantic_parser/SemanticReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ Instance *SemanticReader::GetNext() {
if (line.length() <= 0) break;
if (0 == line.substr(0, 1).compare("#")) {
//LOG(INFO) << line;
name = line;
if (name != "") {
name += "\n" + line;
} else {
name = line;
}
continue; // Sentence ID.
}
vector<string> fields;
Expand Down

0 comments on commit 894c250

Please sign in to comment.