UCFS
1.0.0
注意:重大发展下的项目!
UCFS是一种杂乱无章的信息:解决与无上下文和常规语言相交有关的问题的工具。此类问题的例子:
Usage: kotgll options_list
Options:
--input -> Input format (always required) { Value should be one of [string, graph] }
--grammar -> Grammar format (always required) { Value should be one of [cfg, rsm] }
--sppf [ON] -> Sppf mode { Value should be one of [on, off] }
--inputPath -> Path to input txt file (always required) { String }
--grammarPath -> Path to grammar txt file (always required) { String }
--outputPath -> Path to output txt file (always required) { String }
--help, -h -> Usage info
git clone https://github.com/FormalLanguageConstrainedPathQuerying/kotgll.git
或者
git clone [email protected]:FormalLanguageConstrainedPathQuerying/kotgll.git
或者
gh repo clone FormalLanguageConstrainedPathQuerying/kotgll
cd kotgll
gradle run --args="--help"
您将看到“选项列表”消息。
gradle run --args="--input graph --grammar rsm --sppf off --inputPath src/test/resources/cli/TestGraphReadWriteCSV/dyck.csv --grammarPath src/test/resources/cli/TestRSMReadWriteTXT/dyck.txt --outputPath ./result.txt"
curl -L -O https://github.com/FormalLanguageConstrainedPathQuerying/kotgll/releases/download/v1.0.0/kotgll-1.0.0.jar
java -jar kotgll-1.0.0.jar --input graph --grammar rsm --sppf off --inputPath src/test/resources/cli/TestGraphReadWriteCSV/dyck.csv --grammarPath src/test/resources/cli/TestRSMReadWriteTXT/dyck.txt --outputPath ./result.txt
StartNonterminal("S")
Nonterminal("S") -> Terminal("subClassOf_r") Nonterminal("S") Terminal("subClassOf")
Nonterminal("S") -> Terminal("subClassOf_r") Terminal("subClassOf")
Nonterminal("S") -> Terminal("type_r") Nonterminal("S") Terminal("type")
Nonterminal("S") -> Terminal("type_r") Terminal("type")
StartState(id=0,nonterminal=Nonterminal("S"),isStart=true,isFinal=false)
State(id=0,nonterminal=Nonterminal("S"),isStart=true,isFinal=false)
State(id=1,nonterminal=Nonterminal("S"),isStart=false,isFinal=false)
State(id=4,nonterminal=Nonterminal("S"),isStart=false,isFinal=false)
State(id=3,nonterminal=Nonterminal("S"),isStart=false,isFinal=true)
State(id=2,nonterminal=Nonterminal("S"),isStart=false,isFinal=false)
State(id=6,nonterminal=Nonterminal("S"),isStart=false,isFinal=true)
State(id=5,nonterminal=Nonterminal("S"),isStart=false,isFinal=false)
TerminalEdge(tail=0,head=1,terminal=Terminal("subClassOf_r"))
TerminalEdge(tail=0,head=4,terminal=Terminal("type_r"))
TerminalEdge(tail=1,head=3,terminal=Terminal("subClassOf"))
NonterminalEdge(tail=1,head=2,nonterminal=Nonterminal("S"))
TerminalEdge(tail=4,head=6,terminal=Terminal("type"))
NonterminalEdge(tail=4,head=5,nonterminal=Nonterminal("S"))
TerminalEdge(tail=2,head=3,terminal=Terminal("subClassOf"))
TerminalEdge(tail=5,head=6,terminal=Terminal("type"))
GLL算法已修改以支持图形输入。已在几个实际图上评估了所提出的修改,以查找所有可及性对的情况。
机器配置:带有Ubuntu 20.04的PC,Intel Core i7-6700 3.40GHz CPU,DDR4 64GB RAM。
环境配置:
该图数据是从CFPQ_DATA数据集中选择的。
列出了图形的详细描述。
图名称 | | V | | | E | | #subclassof | #类型 | #BROADERSTANSITIVE |
---|---|---|---|---|---|
酶 | 48 815 | 86 543 | 8 163 | 14 989 | 8 156 |
Eclass | 239 111 | 360 248 | 90 962 | 72 517 | 0 |
进行层次结构 | 45 007 | 490 109 | 490 109 | 0 | 0 |
去 | 582 929 | 1 437 437 | 94 514 | 226 481 | 0 |
地理货物 | 450 609 | 2 201 532 | 0 | 89 065 | 20 867 |
分类学 | 5 728 398 | 14 922 125 | 2 112 637 | 2 508 635 | 0 |
评估中使用的所有查询都是相同代查询的变体。 x
关系和各个边缘的倒数表示为x_r
。
用于RDF图的语法:
G 1
S -> subClassOf_r S subClassOf | subClassOf_r subClassOf
| type_r S type | type_r type
可以在此处找到存储库中G 1无上下文语法的表示。
可以在此处找到G 1无上下文语法作为存储库中递归自动机的表示。
下面列出了与RDF分析相关的图表上所有对可及性查询评估的结果。
在每一行中,几秒钟内的最佳平均时间以粗体突出显示。
图形 | CFG | RSM | Gll4Graph |
---|---|---|---|
酶 | 0.107 | 0.044 | 0.22 |
Eclass | 0.94 | 0.43 | 1.5 |
进行层次结构 | 4.1 | 3.0 | 3.6 |
去 | 3.2 | 1.86 | 5.55 |
地理货物 | 0.97 | 0.34 | 2.89 |
分类学 | 31.2 | 14.8 | 45.4 |
更多的结果,但以原始形式可以在存储库kotgll_benchs中找到