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

print-word-vectors command does not work #44

Open
muldon opened this issue Aug 16, 2018 · 1 comment
Open

print-word-vectors command does not work #44

muldon opened this issue Aug 16, 2018 · 1 comment

Comments

@muldon
Copy link

muldon commented Aug 16, 2018

I could not be able to test print-word-vectors command. While the original is ./fasttext print-word-vectors model.bin < queries.txt, according to JFastText documentation it should be something like:

JFastText jft = new JFastText();
    jft.runCmd(new String[] {
            "print-word-vectors",
            "src/test/resources/models/cbow.model.bin",
            "<",
            "src/test/resources/data/queries.txt"
    });

I checked the compiled version and the command receives 3 arguments. The same command works using linux terminal:
cat queries.txt | java -jar /PATH/JFastText/target/jfasttext-0.4-SNAPSHOT-jar-with-dependencies.jar print-word-vectors ../models/cbow.model.bin > queries.txt
Is there something wrong with the number of parameters on JFastText implementation ?

@kkrugler
Copy link

I believe the runCmd() method passes arguments to fasttext. The last two arguments you're trying to use ("<" and "src/test/resources/data/queries.txt") are shell parameters, not fasttext parameters.

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

2 participants