Krist Wongsuphasawat
Krist Wongsuphasawat
You have to include SentenTree javascript file in the html. When importing via `` tag. The `SentenTree` variable should be available globally and the classes (`SentenTreeBuilder`, `SentenTreeVis`) are nested under...
Umm, SentenTree has 5 dependencies. (See package.json) You already include d3, but you will also need these packages. "d3kit": "^3.2.0", "heap": "^0.2.6", "lodash": "^4.17.4", "webcola": "^3.3.0"
What I meant was you will need to add `` tags for all these libs too. ``` ```
I just add another bundle that bundle all dependencies. Let's give the code below a try. ```html d3.tsv("goal.tsv", function(error, data) { const model = new SentenTree.SentenTreeBuilder().buildModel(data); new SentenTree.SentenTreeVis('#vis') .data(model.getRenderedGraphs(3)) .on('nodeClick',...
Is there any error in the javascript console?
I found the issue. `goal.tsv` and other sample tsv data has no header row, so `d3.tsv` parse it incorrectly. I have included a new file `demo.tsv`. The code below has...
Did you try the latest comment above?
@Vvvickie Please add header row to your data file ``` id text count ``` https://github.com/twitter/SentenTree/blob/master/demo/data/demo.tsv
I just publish version 1.0.0. Please give it a try. The key is to produce data files that is already tokenized into words delimited by space then enforces tokenization by...