sgsinclair / Voyant

GNU General Public License v3.0
208 stars 53 forks source link

loadCorpus should accept array of texts as first argument #496

Closed sgsinclair closed 4 years ago

sgsinclair commented 4 years ago

There's been a regression bug since this used to work:

loadCorpus(["text one","text two"]);

And of course additional arguments should work too:

loadCorpus(["text one","text two"], {inputRemoveUntilAfter: "text"});

ajmacdonald commented 4 years ago

https://github.com/sgsinclair/voyantjs/commit/980f5ab20dcd216dd6de5aec91eda2f5699d5b39

sgsinclair commented 4 years ago

Thanks, but when I try this I get 1 document and I should get two (sorry I wasn't clear about this). In other words each text in the array is a document, they don't get concatenated:

loadCorpus(["one and two","three and four"]); // should produce 2 documents

ajmacdonald commented 4 years ago

https://github.com/sgsinclair/voyantjs/commit/3973e643a785c506e132b096c58e3f8dfb77f5d0