https://github.com/dcavar/treeprocessor

Converter for bracketed annotation syntax trees, generating a PCFG, dominance relations, scope, c-command

https://github.com/dcavar/treeprocessor

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.9%) to scientific vocabulary

Keywords

ai cfg constituent-structure java nlp parsing pcfg phrase-structure-tree syntax treebank
Last synced: 4 months ago · JSON representation

Repository

Converter for bracketed annotation syntax trees, generating a PCFG, dominance relations, scope, c-command

Basic Info
  • Host: GitHub
  • Owner: dcavar
  • License: apache-2.0
  • Language: Java
  • Default Branch: master
  • Homepage: http://damir.cavar.me/
  • Size: 45.9 KB
Statistics
  • Stars: 2
  • Watchers: 3
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
ai cfg constituent-structure java nlp parsing pcfg phrase-structure-tree syntax treebank
Created over 7 years ago · Last pushed over 7 years ago
Metadata Files
Readme License

README.md

TreeProcessor

Copyright 2018 by Damir Cavar

Version: 0.1

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Introduction

This is a tree reader that processes syntactic parse trees as generated by constituent parsers, including Lexical functional Grammar (LFG) c-structures or parse trees that have been generated by Probabilistic Context-free Grammar (PCFG) parsers.

Example tree structure from Wikipedia

Such parsers generate syntactic structures for natural language sentences encode scope relations between constituents, dominance, c-command, and linear order or precedence relations.

They also encode the syntactic production rules of a grammar that is necessary to parse or generate such natural language sentences. By analyzing the tree we can extract and uantify the rules, as well as reconstruct the hierarchical and linear relations of words and syntactic constituents.

There are various ways to encode such trees in form of textual representations. A popular one is to use a bracketed notation with either round or square brackets. The tree structure above could be encoded using square brackets as:

[S [N John ] [VP [V hit ] [NP [D the ] [N ball ] ] ] ]

TreeProcessor converts for bracketed annotation syntax trees that are often the output of Natural Language Processing (NLP) tools to a set of syntactic phrase structure rules with quantification, that is generating a PCFG. It also computes all relations between nodes in the tree, in particular dominance relations, government, scope, c-command, and precedence. For each single node with its generated ID one can query structural information that is relevant for various NLP tasks and deeper Natural Language Understanding (NLU).

Testing and Running

To test the tool, run it over the included trees.txt file, first compile the code:

mvn compile

Package the binary in a jar-file:

mvn package

Run the test with the following command line:

java -jar target/TreeProcessor-1.0-SNAPSHOT-jar-with-dependencies.jar -t

Owner

  • Name: Damir Cavar
  • Login: dcavar
  • Kind: user
  • Location: Bloomington, IN
  • Company: Indiana University

GitHub Events

Total
Last Year

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 15
  • Total Committers: 2
  • Avg Commits per committer: 7.5
  • Development Distribution Score (DDS): 0.4
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Damir Cavar d****r@g****m 9
Damir Cavar d****r@m****m 6
Committer Domains (Top 20 + Academic)
me.com: 1

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

pom.xml maven
  • commons-cli:commons-cli 1.4
  • commons-io:commons-io 2.5
  • org.ini4j:ini4j 0.5.1
  • junit:junit 3.8.1 test