finding length of words

hi, 

 

i wanted to know how i can kind out the lengthg of words. for example i want to know what the longest word is in my data and what the shortest word is. my data is a set of comments i scraped of a social media forum. 

 

regards, Maariya Rashid

Create a bow and use the JavaSnippet node to get the .length() of each term string (...->Bag of Words->Term to String->Java Snippet).

Cheers, Kilian

Hi thanks for the reply. in the java node what code do i input 

 

regards, Maariya 

Use the .length() method provided by the String class. Alternative you can also use the String manipulation node and use the length() function. Please find an example workflow attached.

Cheers, Kilian

 


 

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.