Rykie
#1
Hi Dmitry
Dataset1: Tbl with group of words; ID, Word
Dataset2: Tbl with ID,Comments
How would I search comments for a combination of words, ie
Search Comments for:
Two words, with a proximity of let’s say 3
Example: Team and Good within 3 words of the word team.
Any advise will be appreciated.
Not sure if the Dataset1 should be ID, Word1, Word2?
Thanks
Rykie
Hi Rykie,
I’m not sure I understood the question. Can you please provide a more elaborate example?
Thanks.
Rykie
#3
Hi Dmitry
Attached please find a simplified example of what I am trying to achieve.
Let me know if you need further information.
Thanks for your help.
R
Example.xlsx (8.5 KB)
Here is a project that calculates the number of sentences where a distance between two given words is less than specified.
It does it as follows:
- Split sentences into rows - 1 word per row.
- Normalize words - trim spaces, maker lowercase, remove punctuation.
- Remove non-meaning words: is, the, a, etc.
- Enumerate words in each sentence – get their positions.
- Find positions of the two lookup words (if they are found).
- Consider it a match if the positions are within the specified range (distance).
- Count all matches.
How to use the project – create a table with all necessary pairs of words (must be in the lower case). Then for each pair iterate the project below.
word-distance-matching.morph (7.1 KB)
Example.xlsx (8.5 KB)
Rykie
#5
Wow - this looks great. I will apply it and see how it goes.
Many thanks