Word Cloud text preparation - Near

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?



Hi Rykie,

I’m not sure I understood the question. Can you please provide a more elaborate example?


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.


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:

  1. Split sentences into rows - 1 word per row.
  2. Normalize words - trim spaces, maker lowercase, remove punctuation.
  3. Remove non-meaning words: is, the, a, etc.
  4. Enumerate words in each sentence – get their positions.
  5. Find positions of the two lookup words (if they are found).
  6. Consider it a match if the positions are within the specified range (distance).
  7. 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)

Wow - this looks great. I will apply it and see how it goes.
Many thanks