Comments (2)
Hi,
the ConnectNodes function requires that the SyntaxTree's nodes describe a complete tree (i.e. it doesn't assume that there is an implicit node for each word of the associated sentence or anything like that). If you add a couple of extra nodes to cover the gaps then it should work as expected:
SyntaxTree st;
st.AddNode(0, 2, "X2"); // add a node cover 0 and 2
st.AddNode(0, 3, "X3");
st.AddNode(1, 2, "X1");
st.AddNode(0, 0, "Y");
st.AddNode(3, 3, "Z");
st.ConnectNodes();
Please let me know if it doesn't...
Phil
On 16 Jan 2015, at 10:21, RyanLiu1900 [email protected] wrote:
Hi, this code has some bug, may it get the syntax structure wrong.
For example, use this SyntaxTree, I build this syntax tree.SyntaxTree st;
st.AddNode(0, 2, "X2"); // add a node cover 0 and 2
st.AddNode(0, 3, "X3");
st.AddNode(1, 2, "X1");
st.ConnectNodes();But after it construct the tree, I find that the parent of "X1" is "X3" !!
—
Reply to this email directly or view it on GitHub.
from mosesdecoder.
Got it! Thanks very much.
from mosesdecoder.
Related Issues (20)
- Lexical reordering scoring failed at /home/ubuntu/Moses/mosesdecoder/scripts/training/train-model.perl line 1924. HOT 2
- Please don't create new issues HOT 4
- No abbreviation Files Found HOT 1
- Evaluation with multi-bleu.perl or multi-bleu-detok.perl HOT 16
- Placeholders should be separated by comma HOT 4
- tiny weights after tuning HOT 2
- sentence-splitter HOT 10
- Question:Related translation models.
- How to increase BLEU? HOT 1
- PROBLEM: alignment is 0. HOT 2
- normalize-punctuation.perl Change the Chinese punctuation marks in English sentences into English. HOT 1
- symal crashes on Linux after latest update HOT 3
- It seems the home page is not working HOT 1
- train-model.perl failed HOT 4
- Tunning translation model failed with this error
- Replace non-breaking space with regular space HOT 1
- tokenizer.perl supported language HOT 2
- symal: permission denied HOT 4
- Looking for Arabic/English demo
- webshell exists in the project HOT 1
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 mosesdecoder.