Comments (3)
You can try using edu.stanford.nlp.trees.PennTreeReader. Tree.valueOf(String) might work as well.
from corenlp.
Yes thanks. What do you think about val r: TreeReader = new PennTreeReader(new StringReader(rawString), new LabeledScoredTreeFactory(new StringLabelFactory))
? I found it from the Tregex library!
from corenlp.
Most of our code now uses a CoreLabel for tokens/nodes, which gives you a Map which can have multiple attributes at a node, whereas with a StringLabel, you just get a String at each node. But what you show does work if it is all you need. I would re-recommend:
Tree t = Tree.valueOf("(S (NP (DT The) (NN man)) (VP (VBD slept)) (. .)))
If your needs aren't fancy, that is the easiest way.
from corenlp.
Related Issues (20)
- German Lemma not working? HOT 10
- Wrong POS for "keine": PRON instead of DET HOT 7
- Support HOT 2
- Is downloads.cs.stanford.edu down? HOT 3
- Arabic Processing data HOT 2
- VBN vs VBD in the input files from PTB
- Is https://corenlp.run down? HOT 1
- Local Server Run Fails Due to Main Website Outage HOT 3
- Cannot instantiate a StanfordCoreNLP pipeline in a Springboot Project using Maven HOT 4
- I use this command, but the word-cut results are same to space-split. Thank you very much.
- Unable to install CoreNLP software HOT 7
- KBA appears to miss per:child when separated by location
- edu.stanford.nlp.pipeline.StanfordCoreNLP HOT 1
- Unable to extract triplets HOT 3
- downloadCoreNLP() timeout HOT 2
- TokensRegex cannot detect rules cross special symbols, eg. '.' or ','
- Unable to open "/home/john/extern_data/corenlp-segmenter/dict-chris6.ser.gz" HOT 7
- Creating a Dockerfile for CoreNLP HOT 1
- CoreNLP demo is down! HOT 1
- High concurrency, stanfordnlp out of memory error. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from corenlp.