all AI news
Lark parsing library JSON tutorial
Aug. 13, 2023, 9:50 p.m. |
Simon Willison's Weblog simonwillison.net
Lark parsing library JSON tutorial
A very convincing tutorial for a new-to-me parsing library for Python called Lark.
The tutorial covers building a full JSON parser from scratch, which ends up being just 19 lines of grammar definition code and 15 lines for the transformer to turn that tree in the final JSON.
It then gets into the details of optimization - the default Earley algorithm is quite slow, but swapping that out for a LALR parser (a one-line change) …
building code compilers definition grammar json library parsing python transformer tree tutorial
More from simonwillison.net / Simon Willison's Weblog
Understand errors and warnings better with Gemini
1 day, 3 hours ago |
simonwillison.net
PSF announces a new five year commitment from Fastly
1 day, 12 hours ago |
simonwillison.net
Programming mantras are proverbs
1 day, 13 hours ago |
simonwillison.net
Jobs in AI, ML, Big Data
Software Engineer for AI Training Data (School Specific)
@ G2i Inc | Remote
Software Engineer for AI Training Data (Python)
@ G2i Inc | Remote
Software Engineer for AI Training Data (Tier 2)
@ G2i Inc | Remote
Data Engineer
@ Lemon.io | Remote: Europe, LATAM, Canada, UK, Asia, Oceania
Artificial Intelligence – Bioinformatic Expert
@ University of Texas Medical Branch | Galveston, TX
Lead Developer (AI)
@ Cere Network | San Francisco, US