Skip to content

Commit cf32146

Browse files
authored
SpellingConversionJob: fix bug: deletion of lemmas (#494)
1 parent 01d4fe9 commit cf32146

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lexicon/conversion.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ def run(self):
392392
source_orth, target_orth = target_orth, source_orth
393393
mapping[source_orth] = target_orth
394394
num_mappings = len(mapping)
395-
logging.info("A total of {} word mapping paris".format(num_mappings))
395+
logging.info("A total of {} word mapping pairs".format(num_mappings))
396396

397397
# compile mapping patterns from extra mapping_rules
398398
mapping_patterns = []
@@ -448,6 +448,8 @@ def run(self):
448448

449449
# spelling conversion
450450
for source_orth, target_orth in mapping.items():
451+
if source_orth == target_orth:
452+
continue
451453
target_lemma = orth2lemma.get(target_orth, None)
452454
source_lemma = orth2lemma.get(source_orth, None)
453455
if target_lemma:

0 commit comments

Comments
 (0)