How to use n-gram by document matrix instead of word by document matrix ?
477 views
Skip to first unread message
ChamingaD
unread,
Apr 21, 2012, 5:09:18 AM4/21/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gen...@googlegroups.com
I went through a research paper. They mention that accuracy of LSA can be increase by using n-gram by document matrix instead of word by document matrix.
How can i do that with Gensim ? Is it possible ?
Automated Essay Scoring Using Generalized Latent Semantic Analysis.pdf
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gen...@googlegroups.com, chami...@gmail.com
Would you maybe rewrite your input texts into a set of (say) tri-grams.
e.g. the previous sentence you would rewrite as
"wou oul uld you mayb ayb ybe rew ewr wri rit ite …"
then feed to gensim.
--
Fil
ChamingaD
unread,
Apr 22, 2012, 6:17:00 AM4/22/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gen...@googlegroups.com, chami...@gmail.com
Hmm. I didn't get what you said :/
Fil
unread,
Apr 22, 2012, 12:53:18 PM4/22/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gen...@googlegroups.com, chami...@gmail.com
Just compute the trigrams for each of your texts and make that the text you analyze with gensim? or maybe I didn't understand your question.
-- Fil
IKS Public
unread,
Apr 22, 2012, 1:47:35 PM4/22/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gen...@googlegroups.com
I just did it the hard way by adding w(i-1) and w(i) as the string w(i-1)+w(i) - i use "*" as begin end. Then i weed out infrequent cases with the gensim command
IKS Public
unread,
Apr 22, 2012, 1:50:15 PM4/22/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gen...@googlegroups.com
Oops i put an otherwise illegal char in between like