aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo de la Hogue2023-05-23 09:39:04 +0200
committerThéo de la Hogue2023-05-23 09:39:04 +0200
commit91f0aa415d97fc866729ab2578f04eb6d36918c9 (patch)
treeb154fdcc819fc1cff4b8df1f47609eeb66231a9d
parent58d7b5e637e64536ec488e34236776cea2c7621d (diff)
downloadargaze-91f0aa415d97fc866729ab2578f04eb6d36918c9.zip
argaze-91f0aa415d97fc866729ab2578f04eb6d36918c9.tar.gz
argaze-91f0aa415d97fc866729ab2578f04eb6d36918c9.tar.bz2
argaze-91f0aa415d97fc866729ab2578f04eb6d36918c9.tar.xz
Counting ngram with letter
-rw-r--r--src/argaze/GazeAnalysis/NGram.py4
1 files 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}