TACLE是学习电子表格中约束和公式的工具。
tacle的Python项目详细描述
TACLE:表格约束学习者
TACLE是一个约束学习者,专门设计用于电子表格和表格数据。
安装
pip install tacle
使用TACLE
从命令行运行tacle
tacle可从命令行用于分析csv文件:
python -m tacle data/magic_ice_cream.csv
这将返回文件中的约束列表:
ALLDIFFERENT(T2[:, 1])
ALLDIFFERENT(T1[:, 4])
ALLDIFFERENT(T1[:, 5])
ALLDIFFERENT(T1[:, 6])
T1[:, 1] -> T2[:, 1]
T1[:, 6] = SUM(T1[:, 3:5], row)
筛选输出
如果您对特定类型的约束感兴趣,可以筛选输出:
python -m tacle data/magic_ice_cream.csv -f "foreign-key" # Report only foreign keys
python -m tacle data/magic_ice_cream.csv -f "<f>" # Report only formulas -- use <c> for only constraints
表格
要查看tacle在文件中找到的表,可以运行:
python -m tacle data/magic_ice_cream.csv -t
这将返回TACLE找到的表和块:
Table T1, (1:9, 0:7)
Columns 0-2 (string), Columns 2-6 (int), Columns 6-7 (string)
Table T2, (11:15, 0:2)
Columns 0-1 (string), Columns 1-2 (int)
论文
在我们的两篇论文journal version,demo paper中阅读更多关于tacle工作原理的内容。