updated tutorial
This commit is contained in:
parent
0a3fd8a04e
commit
bd62420cd5
@ -118,9 +118,9 @@ using namespace std;
|
|||||||
int main() {
|
int main() {
|
||||||
Concordia concordia(EXAMPLES_DIR"/../tests/resources/concordia-config/concordia.cfg");
|
Concordia concordia(EXAMPLES_DIR"/../tests/resources/concordia-config/concordia.cfg");
|
||||||
|
|
||||||
boost::shared_ptr<TokenizedSentence> ts = concordia.addExample(Example("Alice has a cat", 56));
|
TokenizedSentence ts = concordia.addExample(Example("Alice has a cat", 56));
|
||||||
cout << "Added the following tokens: " << endl;
|
cout << "Added the following tokens: " << endl;
|
||||||
BOOST_FOREACH(TokenAnnotation token, ts->getTokens()) {
|
BOOST_FOREACH(TokenAnnotation token, ts.getTokens()) {
|
||||||
cout << "\"" << token.getValue() << "\"" << " at positions: [" << token.getStart() << ","
|
cout << "\"" << token.getValue() << "\"" << " at positions: [" << token.getStart() << ","
|
||||||
<< token.getEnd() << ")" << endl;
|
<< token.getEnd() << ")" << endl;
|
||||||
}
|
}
|
||||||
|
@ -14,9 +14,9 @@ using namespace std;
|
|||||||
int main() {
|
int main() {
|
||||||
Concordia concordia(EXAMPLES_DIR"/../tests/resources/concordia-config/concordia.cfg");
|
Concordia concordia(EXAMPLES_DIR"/../tests/resources/concordia-config/concordia.cfg");
|
||||||
|
|
||||||
boost::shared_ptr<TokenizedSentence> ts = concordia.addExample(Example("Alice has a cat", 56));
|
TokenizedSentence ts = concordia.addExample(Example("Alice has a cat", 56));
|
||||||
cout << "Added the following tokens: " << endl;
|
cout << "Added the following tokens: " << endl;
|
||||||
BOOST_FOREACH(TokenAnnotation token, ts->getTokens()) {
|
BOOST_FOREACH(TokenAnnotation token, ts.getTokens()) {
|
||||||
cout << "\"" << token.getValue() << "\"" << " at positions: [" << token.getStart() << ","
|
cout << "\"" << token.getValue() << "\"" << " at positions: [" << token.getStart() << ","
|
||||||
<< token.getEnd() << ")" << endl;
|
<< token.getEnd() << ")" << endl;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user