Hi everybody,
I've got a text file1 (word/tag):
the/PREP sky/NOUN is/VERB blue/ADJ ,/PUNC it/PREP is/VERB wonderful/ADJ
And an other text file2 containing grammar rules (tag sequences)
PUNC ABBREV ABBREV PUNC
PUNC ABBREV PUNC
PUNC ABBREV ABBREV ABBREV PUNC
PUNC NUM PUNC
PUNC DET+NOUN_PROP PUNC
NOUN_PROP ADJ
PREP NOUN VERB ADJ PUNC PREP VERB ADJ
I aim to do what's next :
For each word in the first file (word/tag) compare the tags (what's after /) with the fist tag of each grammar rules (file2) if this match continue the matching process with the rest of the grammar rule (matching file1 components with file2 components) until the end of this rule. Then copy the string of file1 corresponding to a grammar rule in an array then print it in a richtextbox. I will do this rule by rule (read the file2 one line at a time)
Thank you for your help
I've got a text file1 (word/tag):
the/PREP sky/NOUN is/VERB blue/ADJ ,/PUNC it/PREP is/VERB wonderful/ADJ
And an other text file2 containing grammar rules (tag sequences)
PUNC ABBREV ABBREV PUNC
PUNC ABBREV PUNC
PUNC ABBREV ABBREV ABBREV PUNC
PUNC NUM PUNC
PUNC DET+NOUN_PROP PUNC
NOUN_PROP ADJ
PREP NOUN VERB ADJ PUNC PREP VERB ADJ
I aim to do what's next :
For each word in the first file (word/tag) compare the tags (what's after /) with the fist tag of each grammar rules (file2) if this match continue the matching process with the rest of the grammar rule (matching file1 components with file2 components) until the end of this rule. Then copy the string of file1 corresponding to a grammar rule in an array then print it in a richtextbox. I will do this rule by rule (read the file2 one line at a time)
Thank you for your help