scrapinghub/number-parser

Documentation and Understanding of the code

Manish-210 opened this issue · 1 comments

Does there exist any documentation of number-parser library? I was not able to find and hence thinking to write one.
Also how to understand the each step in the code, for now I was understanding every commit from the start.

Hi @Manish-210

I don't think following the commits is a good idea to understand the current code, as some things have been changing over time. The effort you will need to do to understand all is is too much.

The first thing you should do to understand the library is reading the Readme. After that, I recommend you to go inside the number_parser folder (the other folders are for tests and data).

Then, if you check the __init__.py file you will see the public functions: parse, parse_number and parse_ordinal.

Now you can visit the parser.py file and search for those functions and follow the code to understand how it works.

This project is in beta, and there isn't any documentation right now. Building good documentation is time-consuming, and as the code wasn't really stable we were waiting to have a more stable code. However, the public interfaces are now defined, so it could be a starting point to write the documentation.

I really would like to spend some time this year improving the library and integrating it with dateparser and price-parser, but for now I don't have too much time.

Feel free to open PRs to improve the library.