fastrtext
fastrtext copied to clipboard
Space-separated bigram output from get_nn
In my execute, I'm able to easily tell fastRtext to use bigrams, per the instructions/commands for fasttext:
execute(
commands = c(
"skipgram",
"-input",
tmp_file_txt,
"-output",
tmp_file_model,
"-verbose",
1,
"-wordNgrams",
2
)
)
However, to get bigrams out that are space-separated, I'm not sure how to do that with the get_nn function, and it's not in the documentation:
nndf <- as.data.frame(get_nn(model, term, 250))
Thus I end up with messy bigrams in the DF. Any way to force get_nn to return space-separated bigrams?
What do you need to extract ? I am not sure to understand.