I am new to using this parser, but what I wanted to do was print the part that shows "sentence" or "digits" or "words".
When printing you get something like this for example:
<Node called "**sentence**" matching "Flying High!">
<Node called "**words**" matching "Flying">
<Node called "**punctuations**" matching "!">
I wanted to see if there is a way to get the part that says "words" after the "called" or "punctuations".
I am planning to implement something that will count how many times it has seen "words" being called in the tree, but not sure if that is even possible to begin with.
So if sees "sentence" called count += 1,
if sees "punctuations" called add 1 to count
Hopefully this doesn't sound confusing, I would really appreciate some help as a beginner.
I am new to using this parser, but what I wanted to do was print the part that shows "sentence" or "digits" or "words". When printing you get something like this for example:
I wanted to see if there is a way to get the part that says "words" after the "called" or "punctuations".
I am planning to implement something that will count how many times it has seen "words" being called in the tree, but not sure if that is even possible to begin with. So if sees "sentence" called count += 1, if sees "punctuations" called add 1 to count Hopefully this doesn't sound confusing, I would really appreciate some help as a beginner.
Code Example: `
`