This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: benchmark | |
benchmark: main.cc | |
g++ -std=c++0x -O3 -o benchmark main.cc -lboost_timer -lboost_system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: test | |
test: main.cc | |
clang++ -O2 main.cc -o test -lboost_serialization -lboost_thread -lpthread |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from nltk.tree import ParentedTree | |
class Constituent(ParentedTree): | |
def __init__(self, node, children=None): | |
self.head_word = None | |
self.start = None | |
self.end = None | |
super(Constituent, self).__init__(node, children) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
A feature extractor for chunking. | |
Copyright 2010,2011 Naoaki Okazaki. | |
""" | |
# Separator of field values. | |
separator = ' ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ java -cp ./lib/mallet-deps.jar:class/ cc.mallet.fst.SimpleTagger --model-file /dev/null --training-proportion 1.0 --train true --test lab ./examples/train.txt ./examples/test.txt | |
Number of features in training data: 19155 | |
Number of predicates: 21621 | |
Labels: O B-NP B-PP I-NP B-VP I-VP B-SBAR B-ADJP B-ADVP I-ADVP I-ADJP I-SBAR I-PP B-PRT B-LST B-INTJ I-INTJ B-CONJP I-CONJP I-PRT B-UCP I-UCP I-LST | |
Preparing O | |
O->O(O) O,O | |
O->B-NP(B-NP) O,B-NP | |
O->B-PP(B-PP) O,B-PP | |
O->I-NP(I-NP) O,I-NP | |
O->B-VP(B-VP) O,B-VP |