CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Comparing files

  1. #1
    Join Date
    May 2011
    Posts
    1

    Comparing files

    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

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Comparing files

    It would help if you actually asked a question, assuming of course you are actually looking for an answer.

    Aside from no question it is pretty unclear what you are trying to do as well.
    Always use [code][/code] tags when posting code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured