I forked nlpviz and I use it on my macBook.
[login to view URL]
I installed Java9 SE, Maven, and Node.js to use the app.
The app semms to use D3.js and Java.
I'd like you to change the code and render the image as I hope.
I uploaded the final image below.
The point is...
- To change the angle of each image
- To begin a new line for a new sentence
In the [login to view URL], there is "renderText", a function for rendering an image.
```
function renderText(text, language) {
$.ajax({
type: 'GET',
dataType: 'html',
url: "parser",
data: {
text: text,
lang: language
},
success: function (data) {
$("#svg-canvas").empty();
var dataParsed = [login to view URL](data);
var nodes = {};
var edges = [];
[login to view URL](function (e) {
populate(e, nodes, edges);
});
var g = new [login to view URL]()
.setGraph({})
.setDefaultEdgeLabel(function () {
return {};
});
for (var key in nodes) {
var node = nodes[key];
[login to view URL]([login to view URL], {
label: [login to view URL],
class: [login to view URL],
// round edges
rx: 5,
ry: 5
});
}
[login to view URL](function (e) {
[login to view URL]([login to view URL], [login to view URL], {
lineTension: .8,
lineInterpolate: "bundle"
});
});
var render = new [login to view URL]();
var svg = [login to view URL]("#svg-canvas"),
svgGroup = [login to view URL]("g");
render([login to view URL]("#svg-canvas g"), g);
var xCenterOffset = ([login to view URL]("width") - [login to view URL]().width) / 2;
[login to view URL]("transform", "translate(" + xCenterOffset + ", 20)");
[login to view URL]("height", [login to view URL]().height + 40);
// enable zoom and scrolling
[login to view URL]("transform", "translate(5, 5)");
[login to view URL]([login to view URL]().on("zoom", function redraw() {
[login to view URL]("transform",
"translate(" + [login to view URL] + ")" + " scale(" + [login to view URL] + ")");
}));
}
});
}
```
I'd like to fix this function and render the image as I show in the pasted image.
I'd appreciate your help.