Skip to content

Commit 701e233

Browse files
committed
use lemma instead of surf for transcription?
c.f. #58
1 parent d121a18 commit 701e233

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Diff for: src/normaliser.cpp

+7-3
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ void Normaliser::run(std::istream& is, std::ostream& os) {
8585
// 4: lemma
8686
// 5: syntag
8787
//
88-
//
8988
if ((!result.empty()) && (result[2].length() != 0)) {
9089
if (verbose) {
9190
std::cout << "New surface form: " << result[2] << std::endl;
@@ -95,6 +94,7 @@ void Normaliser::run(std::istream& is, std::ostream& os) {
9594
}
9695
else if ((!result.empty()) && (result[4].length() != 0)) {
9796
string outstring = string(result[0]);
97+
string lemma = result[4];
9898
if (tags.empty()) {
9999
os << outstring << std::endl;
100100
}
@@ -142,8 +142,11 @@ void Normaliser::run(std::istream& is, std::ostream& os) {
142142
std::cout << "Using MIDTAPE: " << surf << std::endl;
143143
}
144144
}
145-
else if (verbose) {
146-
std::cout << "Using surf: " << surf << std::endl;
145+
else {
146+
surf = lemma.substr(1, lemma.length() - 2);
147+
if (verbose) {
148+
std::cout << "Using lemma: " << surf << std::endl;
149+
}
147150
}
148151
if (expand) {
149152
// 1. apply expansions from normaliser
@@ -260,6 +263,7 @@ void Normaliser::run(std::istream& is, std::ostream& os) {
260263
}
261264
}
262265
}
266+
// XXX: count some tabs
263267
os << "\t\"" << newlemma << "\"" << reanal << " \"" << phon
264268
<< "\"phon" << std::endl;
265269
os << "\t" << result[0] << std::endl;

0 commit comments

Comments
 (0)