Weekly Update
Hey everyone number-parser is up and running ( number parser ). Do check it out and raise issues / feature request etc.
It was a really fun and productive first week and I have got the basic version done and will keep on refining it in the upcoming weeks.
So the procedure for the parser is as follows :-
- Identify all the words which are numbers / part of number in natural language ( hundred , twelve , seven , million )
- This list of token is passed to a number builder.
- The number is built by putting appropriate signs b/w the tokens (current value is multiplied on encountering a multiplier like hundred ,thousand , million etc)
- [ nine , hundred , and , seven , thousand] - parser would treat it as ( 9 * 100 + 7 ) * 1000 = 907000
The parser takes a string as input and only changes the words which are numbers. Thus non number words are ignored.
Most of the learning was in the setup needed to create the library. This involved configuring the setup.py and setting up a robust testing environment (tox). The mentors were really helpful and reviewed the code mid-week and gave important insights. Overall it was a smooth first week of coding with no major issues.
Next Week
The plan for next week is to do a more robust testing of the parser (adding more test-cases ) and then move to integration of the current work of number-parser with the date-parser library.