Getting wordlist for each separate file in the Process Documents operator
Hey folks,
I am trying to get the top words from text files using the process in the XML below to get the top words in text files. However I wish to get the top words for each text file in a folder seperately the operation below gives me the results for the whole collection of text files. Is there anyway to get the operation to process them individually rather than as a group?
Thanks in advance,
Neil.
I am trying to get the top words from text files using the process in the XML below to get the top words in text files. However I wish to get the top words for each text file in a folder seperately the operation below gives me the results for the whole collection of text files. Is there anyway to get the operation to process them individually rather than as a group?
Thanks in advance,
Neil.
< portSpacing端口= " sink_result 2”间隔= " 0 " / >
Tagged:
0
Best Answer
-
kayman MemberPosts:662UnicornI don't know your complete process, but as you are looping through files you should be able to store the filename as a macro value. Check your loop operator for the macro options, typically it will allow you to store things like filename and location etc.
This gives you a few options, for instance :
Loop files, store current filename as macro - > generate wordlist - > wordlist to example - > generate attribute and give it the value of you macro. This would be something like %{file_name}
Or you could use the macro to rename your attributes in your word files, whatever works best for you.
5
Answers
Sorry for the delay in my reply and thanks for the help. I am now looping through the text files with the process above successfuly but the wordlist is empty for all files in my output list
Thanks again,
Neil.
Or better, try first without any pruning and bypass filter tokens etc to ensure you don't loose your content in these step. And if you do you know at least why you get no results.
Also, just as a sidenote, given that you are only looking for your wordlist you can untick the 'vector creation' in your process documents operator. you don't need it so it will speed up things a bit.
Neil.