0 ×

Term Neighborhood Extractor

KNIME Textprocessing Plug-in version 4.4.0.v202106141441 by KNIME AG, Zurich, Switzerland

This node extracts the neighborhood for each term of the document. The neighborhood is defined by the N left and N right neighbors that can be set in the dialog. The neighbors can be extracted as term cells or string cells. Each neighbor is stored in a column, however it's also possible to store the right and left neighbors in a collection cell. Additionally, there is an option to extract the sentence in which the term occurs.


Document column
Select the document column that is used for term neighborhood extraction.
Neighbors to extract
The number of (left/right) neighbors to extract.
Extract sentences
If checked, the second column contains the sentence of the document containing the term.
Neighbor Terms as Strings
If checked, neighbors will be extracted as String columns, otherwise as Term columns.
Neighbors as Collection
If checked, the neighbors will be all encapsulated in a collection (one collection for left neighbors, one collection for right neighbors), otherwise there will be one column for each neighbor. If no neighbor exists, the value is a missing value.

Input Ports

The input table containing the documents.

Output Ports

An output table containing documents, terms and their N neighbors.

Best Friends (Incoming)

Best Friends (Outgoing)



To use this node in KNIME, install KNIME Textprocessing from the following update site:


A zipped version of the software site can be downloaded here.

You don't know what to do with this link? Read our NodePit Product and Node Installation Guide that explains you in detail how to install nodes to your KNIME Analytics Platform.

Wait a sec! You want to explore and install nodes even faster? We highly recommend our NodePit for KNIME extension for your KNIME Analytics Platform. Browse NodePit from within KNIME, install nodes with just one click and share your workflows with NodePit Space.


You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.