Using Dictionary to search values , print keys and plot graph

I am using dictionary with words and corresponding three numeric values. I have to search words in processed corpus file .I have to get output with all words and key that are present in processed corpus file. I have tried all dictionary I am not able to implement.

Hi @Afrin and welcome to the forum.

I’m not 100% sure what you want to do here. I gather you want to apply numeric tags based on your dictionary, and then ultimately you want to… filter so that only those tagged words remain in your processed documents? I don’t think I’m understanding the problem correctly.

Could you post some dummy datasets with your sample inputs and desired outputs?

image9

I am doing Emotion Analysis. I have a corpus file consisting of 3 columns Lyrics ,SNO and song name. Plus I have ANEW dictionary consisting of Words and its corresponding Valence, Dominance and Arousal values. The three values depict emotion for a particular word

  • I have cleaned Corpus file.

  • I have to search (Words) of ANEW dictionary from Corpus file(Lyrics Column)

  • If the word is present in Corpus file ,then I have to get its Valence ,Arousal and Dominance values.

  • There are 26 Lyrics in Corpus file ,so I need to print all words and its valence ,arousal & dominance values present in Corpus .
    Expected output
    SNO | word| Valence| Arousal | Dominance

Here’s something that may help. I went ahead and made up some data formatted similar to yours to test it out:

SongLyricExample.knwf (34.4 KB)

2020-08-20 14_05_33-Filtered table - 0_10 - Column Filter (Cleanup)

If you have any questions, just ask.

2 Likes

Thanks very much for your kind help. I just want to confirm selecting source from String to Document operator and source option from Data Document Extractor helped in getting the SNO.
io

io

2 Likes

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