Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check Treebank for suspicious configurations #16

Open
jeisner opened this issue Mar 21, 2016 · 0 comments
Open

check Treebank for suspicious configurations #16

jeisner opened this issue Mar 21, 2016 · 0 comments

Comments

@jeisner
Copy link
Owner

jeisner commented Mar 21, 2016

[item from the old TO-DO file dated 2002-04-07]

check for other things [in the Treebank] that look like bugs. For example, I saved the following snippet that detects indexed traces that aren't bound.

[1/4/98.  Find all the traces in Treebank II, their nonterminal
categories, and the nonterminal categories they end up as.  See
~/tmp/move-categories and ~/tmp/move-categories-summary.]

~/hw/learn/02-subcat-study/extract/oneline -n ~/info/wsj/*/* | perl5 -e '$token = "[^ \t\n()]+"; $ind = "-[0-9]+\\b"; $tokennoind = "(?:(?!$ind)[^ \t\n()])+"; while (<>) { s/^(\S+:[0-9]+:\t)?//, $location = $&; while (/\(($tokennoind)(?:$ind)? \(-NONE- ($tokennoind)($ind)/og) { print "$location$2 $1 "; if (/\(($tokennoind)$3 /) { print "$1\n" } else {print "not_found\n" }}}' | sort -k 2 | uniq -f 1 -c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant