I have a list of words like this:
['Urgente', 'Recibimos', 'Info']
I used the parsetree (parsetree(x, lemmata = True)
function to convert the words and the output for each Word is this:
[[Sentence('urgente/JJ/B-ADJP/O/urgente')],
[Sentence('recibimos/NN/B-NP/O/recibimos')],
[Sentence('info/NN/B-NP/O/info')]]
Each component of the list has the type pattern.text.tree.Text
.
I need to obtain only the group of words into the parenthesis but I don´t know how to do this, I need this output:
[urgente/JJ/B-ADJP/O/urgente,
recibimos/NN/B-NP/O/recibimos,
info/NN/B-NP/O/info]
I use str
to convert to string each component to the list but this changes all output.