Nice — glad that part is working!
If you only want to grab a keyword / primary noun from the latest line, you’ll need a little bit of natural-language filtering inside your DAT Execute.
Since TouchDesigner runs Python, you can use a very lightweight approach:
text = dat[0,2].val # latest text
words = [w.strip(",.!?-") for w in text.split()]
keyword = max(words, key=len) if words else ""
op('latest_text').text = keyword
TouchDesigner ships with standard Python, so you can install nltk (or spacy) if you’re comfortable adding libraries. Example with nltk:
from nltk import word_tokenize, pos_tag
tokens = word_tokenize(text)
nouns = [word for word,pos in tagged if pos.startswith('NN')]
keyword = nouns[0] if nouns else ""
op('latest_text').text = keyword
⚡ If you want fast and simple inside TD without external installs, go with Option 1 or a rule-based filter (e.g., pick any word from a list you care about like "flowers", "sea", "boat").
Do you want me to write you a rule-based filter (so you can just define your own list of “primary nouns” to look for), or would you like to try hooking in nltk/spacy?