Can you show a concrete example of what you want? What is the input, what is the expected output?
(and you really should try and find a more descriptive subject to this thread...)
"...we are looking for the distributed"
"function which can only be found..."
This logic should work...
1 read in a line of text and check for consecutive words that match the phrase
2 save the last word in that line
3 read in a line of text and check for consecutive words that match the phrase, also check word saved in step 2 with first word of this line for a match (don't forget to account for spacing)
4 goto step 2
The split() and match() string functions and substr() method might be handy!
Alternatively, if you have sufficient memory to read in the whole file as a single string, it
might be easier.
Thanks for your response.
I have text file included text
for example:
"
hash table hash map data structure uses
hash function. ",
"Map identifying values, known keys , associated values. ",
"Hash table implements associative array. Hash function used transform key index array element. "
the out put it supposed to be like:
hash table
hash map
data structure
hash function
map values
keys
array
I need the output like dictionary for computer science or dictionary for math
So you need to build an index of terms and exclude certain words, phrases and punctuated words. In my experience this is very difficult to achieve unless the content is extremely narrowly defined. Indexing a file for words isn't so hard but creating the exclusion-list (a sort of black-list) is very hard - thats why indexing books is still a largely manual task.
Leave a comment on not_55's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic