diff options
author | Théo de la Hogue | 2023-05-23 09:39:04 +0200 |
---|---|---|
committer | Théo de la Hogue | 2023-05-23 09:39:04 +0200 |
commit | 91f0aa415d97fc866729ab2578f04eb6d36918c9 (patch) | |
tree | b154fdcc819fc1cff4b8df1f47609eeb66231a9d | |
parent | 58d7b5e637e64536ec488e34236776cea2c7621d (diff) | |
download | argaze-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.py | 4 |
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} |