Skip to content

Commit 67f4249

Browse files
committed
use lemmas
1 parent a219eef commit 67f4249

1 file changed

Lines changed: 5 additions & 18 deletions

File tree

src/phon.cpp

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ void Phon::mangle_reading(
9898
}
9999
}
100100
else {
101-
phon = surf;
101+
phon = reading.lemma.substr(1, reading.lemma.length() - 2);
102102
if (verbose) {
103-
std::cout << "Using surf: " << phon << std::endl;
103+
std::cout << "Using lemma: " << phon << std::endl;
104104
}
105105
}
106106
std::string alttag = "";
@@ -203,23 +203,10 @@ void Phon::process_reading(
203203
if (verbose) {
204204
std::cout << "Using prefix " << prefix << std::endl;
205205
}
206-
auto phonend = reading.reading.find("\"phon");
207-
auto phonstart = reading.reading.rfind("\"", phonend - 1);
208206
std::string phon = "";
209-
if (phonend != std::string::npos) {
210-
phon =
211-
reading.reading.substr(phonstart + 1, phonend - phonstart - 1);
212-
reading.reading.erase(
213-
phonstart, phonend - phonstart + strlen("\"phon"));
214-
if (verbose) {
215-
std::cout << "Found suffix " << phon << std::endl;
216-
}
217-
}
218-
else {
219-
phon = reading.lemma.substr(1, reading.lemma.length() - 2);
220-
if (verbose) {
221-
std::cout << "Using lemma as suffix " << phon << std::endl;
222-
}
207+
phon = reading.lemma.substr(1, reading.lemma.length() - 2);
208+
if (verbose) {
209+
std::cout << "Using lemma as suffix " << phon << std::endl;
223210
}
224211
phon = prefix + phon;
225212
reading.reading.replace(reading.reading.end() - 1,

0 commit comments

Comments
 (0)