Post

Replies

Boosts

Views

Activity

Reply to Recognizing Handwritten Mathematics with the On-Device Language Model
Thank you for taking the time to share your thoughts! I've actually experimented with PencilKit's handwriting recognition before exploring Foundation Models. Unfortunately, I found that it doesn't work particularly well for my use case, especially when dealing with more complex mathematical notation such as matrices or integrals. Another issue is that PKStrokeRecognizer can return the same textual output for handwritten expressions with different mathematical meanings, making the result ambiguous. For example: A fraction with 2 as the numerator and 5 as the denominator, followed by multiplication with x. Intended meaning: (2/5) * x A fraction with 2 as the numerator and 5x as the denominator. Intended meaning: 2/(5x) Both are recognized as 2/5x, even though they represent two mathematically different expressions. Regarding the AST, perhaps I should clarify my architecture: My MathToken enum is intended as an intermediate representation rather than the AST itself. I've implemented my own parser based on a formal grammar, which processes these tokens and constructs the actual AST. So I agree that parsing and constructing the AST should be handled deterministically rather than by an LLM. The idea is to use the LLM for the recognition and generation of the structured tokens that serve as input to my parser. I'd be curious how you would approach mathematical handwriting recognition in general, particularly for complex structures such as matrices and integrals, where preserving mathematical meaning is essential. Do you think Foundation Models is a suitable tool for this, perhaps with a different approach or multi-stage architecture, or would you consider it fundamentally the wrong tool for the job? Thanks again for your input!
2w
Reply to Recognizing Handwritten Mathematics with the On-Device Language Model
Thank you for taking the time to share your thoughts! I've actually experimented with PencilKit's handwriting recognition before exploring Foundation Models. Unfortunately, I found that it doesn't work particularly well for my use case, especially when dealing with more complex mathematical notation such as matrices or integrals. Another issue is that PKStrokeRecognizer can return the same textual output for handwritten expressions with different mathematical meanings, making the result ambiguous. For example: A fraction with 2 as the numerator and 5 as the denominator, followed by multiplication with x. Intended meaning: (2/5) * x A fraction with 2 as the numerator and 5x as the denominator. Intended meaning: 2/(5x) Both are recognized as 2/5x, even though they represent two mathematically different expressions. Regarding the AST, perhaps I should clarify my architecture: My MathToken enum is intended as an intermediate representation rather than the AST itself. I've implemented my own parser based on a formal grammar, which processes these tokens and constructs the actual AST. So I agree that parsing and constructing the AST should be handled deterministically rather than by an LLM. The idea is to use the LLM for the recognition and generation of the structured tokens that serve as input to my parser. I'd be curious how you would approach mathematical handwriting recognition in general, particularly for complex structures such as matrices and integrals, where preserving mathematical meaning is essential. Do you think Foundation Models is a suitable tool for this, perhaps with a different approach or multi-stage architecture, or would you consider it fundamentally the wrong tool for the job? Thanks again for your input!
Replies
Boosts
Views
Activity
2w