Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how convert a data frame or table to a VectorSpaceModel? #41

Open
rgoldsto opened this issue Nov 13, 2017 · 0 comments
Open

how convert a data frame or table to a VectorSpaceModel? #41

rgoldsto opened this issue Nov 13, 2017 · 0 comments

Comments

@rgoldsto
Copy link

I have a word vector data frame created outside of wordVectors that currently looks like
V1 V2 V3 V4 V5 .............
1 der -0.1292338 1.41541564 0.72683984 -0.08601953
2 die -0.7408874 1.23070979 1.60728443 0.21427894
3 und 0.1368700 0.21688898 0.09194378 -0.42764056
4 in -0.9566143 1.17804027 0.13917272 1.63949668
5 von -1.2693109 0.92857528 -0.88062751 1.41522074
6 den -0.8766794 0.45545051 1.42592216 -1.87232220
7 des 0.8585002 0.80657679 2.12942553 -1.49346220
8 im -1.8885295 0.35904437 0.97661573 -0.38748211
9 mit -0.5756816 -1.57236266 -2.10877585 1.33090031
10 das -0.9001577 -0.02004211 1.45430076 0.93866318
...
and would like to use wordVectors operations. I see that there is a as.VectorSpaceModel(matrix) coercion function, but I don't know the form of the matrix that is required for the coercion to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant