blob: 7d7001094e765cda740e375b666ff7827ef38051 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/usr/bin/env python
""" """
__author__ = "Théo de la Hogue"
__credits__ = []
__copyright__ = "Copyright 2023, Ecole Nationale de l'Aviation Civile (ENAC)"
__license__ = "BSD"
from typing import TypeVar, Tuple, Any
from dataclasses import dataclass, field
from argaze import GazeFeatures
from lempel_ziv_complexity import lempel_ziv_complexity
@dataclass
class AOIScanPathAnalyzer(GazeFeatures.AOIScanPathAnalyzer):
"""Implementation of Lempel ziv complexity algorithm as described in Lounis paper.
"""
def __post_init__(self):
pass
def analyze(self, aoi_scan_path: GazeFeatures.AOIScanPathType) -> Any:
"""Analyze aoi scan."""
assert(len(aoi_scan_path) > 1)
return lempel_ziv_complexity(str(aoi_scan_path))
|