int2str / jssyntaxtree Goto Github PK
View Code? Open in Web Editor NEWDynamic JavaScript version of phpSyntaxTree - a tool to draw syntax trees from labelled bracket notation.
License: GNU General Public License v2.0
Dynamic JavaScript version of phpSyntaxTree - a tool to draw syntax trees from labelled bracket notation.
License: GNU General Public License v2.0
Nice project! ๐
I cant create a pull request, soI will let you my additions here.
FROM nginx:1.19
COPY . /usr/share/nginx/html
You can run jsSyntaxTree also locally on docker:
docker build -t jssyntaxtree .
docker run -p 80:80 jssyntaxtree
Sometimes I would prefer an option that forced jssyntaxtree to put all words on the lowest level. At the moment, I have to cheat and then use a graphics program to correct the line, as in this example:
[sentence [main-clause [S I] [V admire] [O her reasoning]] [[[ but]]] [main-clause [S I] [V reject] [O her conclusions]]]
Thanks for your consideration!
Allow for direct URL export of current sentence:
https://ironcreek.net/syntaxtree/?[S%20[NP%20jsSyntaxTree][VP%20[V%20creates][NP%20nice%20syntax%20trees%20-%3E1]]]
[Filed on behalf of @brucetesar]
Manual subscript works well for non-leaf nodes. However, I couldn't get it to work for leaf nodes. For instance, if I have a trace as a leaf node, and I try to co-index it, I still get t_i in the result. Could you extend the pattern to leaf nodes?
Thank you for the great work! I already suggested your website to my students in the syntax course. I was just wondering is there a way to change the connector height? Also, are you planning on adding text decorations like italic face.
Draw this tree, and watch the arrow as it vanishes in the middle.
[A_A [B_B lorem] [C_C [D_D ipsum] [E_E [F_F dolor] [G_G [H_H sit] [I_I [J_J amet] [K_K [L_L consectetur] [M_M [N_N adispicing] [O_O elit -> 1]]]]]]]]
In the old php version, it was possible to add manual subscripts to nodes using the underscore notation: "N_i" came out as N with subscript i. This feature doesn't work for me in the new js version. Has it not been implemented (yet)?
P.S. Thanks for maintaining this very useful tool.
I would like to be able to insert spaces into nonterminals, for instance in the following diagram, where I needed to have a space between "main" and "clause":
[sentence [main-clause [S I] [V admire] [O her reasoning]] but [main-clause [S I] [V reject] [O her conclusions]]]
Of course entering an actual space does not work, and underscores are already taken, but unfortunately, all blank characters I enter will be converted to spaces (e.g. ALT+255 or anything from here). I think adding support for something that does not usually occur to be converted into a space would be a useful feature, say a double percent sign:
main%%clause
What do you think?
@int2str Great to discover your code. May I ask for a little guidance?
I wish to create syntax trees for Lushootseed, a Pacific Northwest indigenous language. See, for instance, this work in progress:
Does there exist, or can you help me create, a stand-alone javascript script which creates a syntax tree svg diagram from labeled bracket notation? With such a capability, I could - from the command line - experiment to find a suitable bracket notation for each line in the story, of which this is one example:
After rendering svg to a file, I could later include it as part of the annotation pop-in.
I'll be grateful for any advice you can give.
Just saw version 1.10. The arrow feature looks cool! But, indicating subscripts with underscore now acts differently. If I enter [V t_j], I get an error message below the entry box, "Unexpected SUBSCRIPT_PREFIX at idx 3", and the desired subscript does not appear. After playing with it for a while, I found a workaround: [V [t_j]], with an additional pair of square brackets surrounding the subscripted term and its subscript, does what is desired. What seems to matter is that the subscripted term is the first term after a left square bracket: [V [t_j ]] works as expected, as does [V [t_j a]]. Perhaps something to do with how the input is tokenized?
First of all, thanks for the great work, which I have been using and recommending to my students for years!
In phpSyntaxtree there used to be an SVG download, which allowed me to change things in Inkscape when I was unhappy with the original layout (and which was easier to adapt for high-resolution publications). Do you plan to bring this back?
Hi there, thanks for making this! There is a minor typo in tip.js
line 10: "The graph will updarte automatically..."
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.