From 3b0412241075bd3846d03b08b2df7b3a32cd8f66 Mon Sep 17 00:00:00 2001 From: Flammie Pirinen Date: Tue, 26 Jun 2018 02:39:28 +0200 Subject: [PATCH] fix STUB stuff from segments --- src/python/omorfi/token.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/omorfi/token.py b/src/python/omorfi/token.py index 5d6711e60..89d24f7d3 100644 --- a/src/python/omorfi/token.py +++ b/src/python/omorfi/token.py @@ -526,7 +526,7 @@ def get_segments(token, split_morphs=True, split_words=True, split_nonwords=False): segments = token['segments'] # this code is ugly - segments = [segments.replace('{hyph?}', '')] + segments = [segments.replace('{hyph?}', '').replace("{STUB}", "")] resegs = [] for segment in segments: if split_morphs: