Skip to content

Commit

Permalink
du/pl ; wildcards
Browse files Browse the repository at this point in the history
  • Loading branch information
dwerning committed Sep 20, 2022
2 parents 38c7239 + 6e00692 commit 7bcdf23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,17 @@ public String maskRegExTranscription(String transcription) {
transcription = transcription.replace("⸮", "");
// "?", "[" , and "]" are part of allowed RegEx syntax

// BTS wildcards (any sign)
// leagacy TLA wildcards
transcription = transcription.replace("§", "."); // "§" in legacyTLA
transcription = transcription.replace("*", "."); // "*" new in newTLA

// Usual wildcards
transcription = transcription.replace("_", "."); // any sigle sign
transcription = transcription.replace("*", ".*"); // zero or more signs

// treatment of right end
if (transcription.endsWith("$")) { // "$": wirkliches String-Ende
transcription = transcription.replace("$", ""); // remove "$" (all, just to be sure)
} else {
} else if (!transcription.endsWith(".*")) { // redundant if already ends with ".*"
transcription = transcription + ".*"; // right: any signs may follow
}

Expand Down
12 changes: 0 additions & 12 deletions src/main/resources/elasticsearch/settings/indices/lemma.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,6 @@
"transcription_suffix_filter": {
"type": "mapping",
"mappings": [
".t.pl => .wt",
".t:pl => .wt",
".tpl => .wt",
"t.du => .tj",
"t:du => .tj",
".tdu => .tj",
",t,pl => ,wt",
",tpl => ,wt",
"t,du => ,tj",
",tdu => ,tj",
"du => wj",
"pl => w",
", => ."
]
},
Expand Down

0 comments on commit 7bcdf23

Please sign in to comment.