![]() |
| ||
| string: get token from string and compare token from text file i need to write a code on how can break a sentence into word and find out the word belong to. example : when user input a sentence cindy walk slow. 1.break the sentence into cindy,walk,slow. 2.get each word belong to and display. - cindy is a noun - walk is a verb - slow is a adjective. i had make 2 file text: 1. verb .txt 2. adjective verb.txt eat adjective fast this is the code i had done: const size=100; //size of string the output: input string ali walk slow walk is a verb slow is a adjective what i want to know is how i can get word ali belong to? i didn't want to make a text file that contain of the noun. if the word not in the verb.txt and adjective.txt,therefore it is a noun.. please help me.. anyway thank you. |
| ||
| Re: string: get token from string and compare token from text file set a boolean flag to indicate if the word is found in one of the two files. If not set then it must be a noun. Something like this sudo-code. Note: search second file ONLY if the word is not in the first file. set flag to false |
| ||
| Re: string: get token from string and compare token from text file thank you..i think i get it on..let me try first.. |
| All times are GMT -4. The time now is 11:30 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC