From 91f0aa415d97fc866729ab2578f04eb6d36918c9 Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Tue, 23 May 2023 09:39:04 +0200 Subject: Counting ngram with letter --- src/argaze/GazeAnalysis/NGram.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/argaze/GazeAnalysis/NGram.py b/src/argaze/GazeAnalysis/NGram.py index b985d7d..dc7b43e 100644 --- a/src/argaze/GazeAnalysis/NGram.py +++ b/src/argaze/GazeAnalysis/NGram.py @@ -29,6 +29,6 @@ class AOIScanPathAnalyzer(GazeFeatures.AOIScanPathAnalyzer): sequence = str(aoi_scan_path) ngrams = zip(*[sequence[i:] for i in range(n)]) - ngrams = [tuple([aoi_scan_path.get_letter_aoi(l) for l in ngram]) for ngram in ngrams] + ngrams = [ngram for ngram in ngrams] - return {ngram : ngrams.count(ngram) for ngram in ngrams} + return {tuple([aoi_scan_path.get_letter_aoi(l) for l in ngram]) : ngrams.count(ngram) for ngram in ngrams} -- cgit v1.1