Seeding from the 1.2 tree.
This commit is contained in:
32
dll/europa/cse476/p1.cpp
Normal file
32
dll/europa/cse476/p1.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#include <iostream.h>
|
||||
#include <fstream.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "parse.h"
|
||||
#include "grammar.h"
|
||||
#include "lexicon.h"
|
||||
#include "list.h"
|
||||
#include "gnode.h"
|
||||
|
||||
Grammar grammar("grammar.txt");
|
||||
Lexicon lexicon("lexicon.txt");
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
char *sentence = "Jack was happy to see a dog.";
|
||||
|
||||
// cout << "[nlp]$ " << sentence << endl;
|
||||
// parse(sentence);
|
||||
|
||||
sentence = new char[1000];
|
||||
cout << "[nlp]$ " << flush;
|
||||
cin.getline(sentence, 999);
|
||||
// while(cin) {
|
||||
if(strlen(sentence))
|
||||
parse(sentence);
|
||||
|
||||
// cout << "[nlp]$ " << flush;
|
||||
// cin.getline(sentence, 999);
|
||||
// }
|
||||
|
||||
cout << "Bye bye..." << endl;
|
||||
}
|
||||
Reference in New Issue
Block a user