I want to create a term matrix document to determine the keywords of a set of words based on the label.
My dataset looks like this.
id | description | severity |
-------------------------------------------------------------------------------------------
10020 | remotely deleting file opened editor | major |
10021 | setting editor color setting string requires application restart | minor |
100210 | ant build files cleared platform restart | major |
I want to create a term matrix document that looks like this.
| major | minor |
------------------------
editor | 1 | 1 |
restart | 1 | 1 |
1 is frequency from word, but I want to fill it with tfidf weight.
Does anyone have any ideas?
question from:
https://stackoverflow.com/questions/66066587/create-document-term-matrix-from-dataframe-in-python 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…