From bd12ef8b69e7940039719a7935f5176e47163cf7 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Tue, 31 Aug 2021 14:49:38 +0200 Subject: [PATCH] Fix up python test code --- instant-segment-py/test/test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instant-segment-py/test/test.py b/instant-segment-py/test/test.py index bb41da9..fa85cdf 100644 --- a/instant-segment-py/test/test.py +++ b/instant-segment-py/test/test.py @@ -3,12 +3,12 @@ import instant_segment, os, sys DATA_DIR = os.path.join(os.path.dirname(__file__), '../../data/') def unigrams(): - for ln in open(os.path.join(DATA_DIR, 'unigrams.txt')): + for ln in open(os.path.join(DATA_DIR, 'en-unigrams.txt')): parts = ln.split('\t', 1) yield (parts[0], float(parts[1].strip())) def bigrams(): - for ln in open(os.path.join(DATA_DIR, 'bigrams.txt')): + for ln in open(os.path.join(DATA_DIR, 'en-bigrams.txt')): word_split = ln.split(' ', 1) score_split = word_split[1].split('\t', 1) yield ((word_split[0], score_split[0]), float(score_split[1].strip()))