EmilStenstrom / conllu

A CoNLL-U parser that takes a CoNLL-U formatted string and turns it into a nested python dictionary.
MIT License
311 stars 50 forks source link

Update parser.py #1

Closed svetlana21 closed 7 years ago

svetlana21 commented 7 years ago

Allows to choose columns to parse if you have less than 10 columns in a conllu file.

EmilStenstrom commented 7 years ago

@svetlana21 Excellent! Could I ask for one more favor? If I merge this right away, some people that use parse() in their code will be missing a parameter. But if you set to_parse to a default value, all old code will continue to work. I'll take it from there and add tests and all that! Thanks again!

svetlana21 commented 7 years ago

@EmilStenstrom Ok. It should be a list of all column names, am I right?

EmilStenstrom commented 7 years ago

@svetlana21 Yep!

EmilStenstrom commented 7 years ago

Thank you! ❤️

EmilStenstrom commented 7 years ago

I'll make a new release version to PyPi later this week, so we can all get this code by "pip install".

svetlana21 commented 7 years ago

I'm so glad to make a contribution! Thank you, too :)

EmilStenstrom commented 7 years ago

@svetlana21 Now the new version is live! I changed some things compared to the code you submitted:

Version 0.4 is up now! https://pypi.python.org/pypi/conllu

svetlana21 commented 7 years ago

Happy to see it! Thank you :)