Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3657604.3662027acmotherconferencesArticle/Chapter ViewAbstractPublication Pagesl-at-sConference Proceedingsconference-collections
research-article

Handwritten Code Recognition for Pen-and-Paper CS Education

Published: 15 July 2024 Publication History

Abstract

Teaching Computer Science (CS) by having students write programs by hand on paper has key pedagogical advantages: It allows focused learning and requires careful thinking compared to the use of Integrated Development Environments (IDEs) with intelligent support tools or "just trying things out". The familiar environment of pens and paper also lessens the cognitive load of students with no prior experience with computers, for whom the mere basic usage of computers can be intimidating. Finally, this teaching approach opens learning opportunities to students with limited access to computers. However, a key obstacle is the current lack of teaching methods and support software for working with and running handwritten programs. Optical character recognition (OCR) of handwritten code is challenging: Minor OCR errors, perhaps due to varied handwriting styles, easily make code not run, and recognizing indentation is crucial for languages like Python but is difficult to do due to inconsistent horizontal spacing in handwriting. Our approach integrates two innovative methods. The first combines OCR with an indentation recognition module and a language model designed for post-OCR error correction without introducing hallucinations. This method, to our knowledge, surpasses all existing systems in handwritten code recognition. It reduces error from 30% in the state of the art to 5% with minimal hallucination of logical fixes to student programs. The second method leverages a multimodal language model to recognize handwritten programs in an end-to-end fashion. We hope this contribution can stimulate further pedagogical research and contribute to the goal of making CS education universally accessible. We release a dataset of handwritten programs and code to support future research.

References

[1]
J. Achiam, S. Adler, S. Agarwal, L. Ahmad, I. Akkaya, F. L. Aleman, D. Almeida, J. Altenschmidt, S. Altman, S. Anadkat, et al. Gpt-4 technical report. arXiv preprint arXiv:2303.08774, 2023.
[2]
N. Arica and F. T. Yarman-Vural. Optical character recognition for cursive handwriting. IEEE transactions on pattern analysis and machine intelligence, 24(6):801--813, 2002.
[3]
B. W. Becker. Teaching cs1 with karel the robot in java. In Proceedings of the thirty-second SIGCSE technical symposium on Computer Science Education, pages 50--54, 2001.
[4]
T. Bell and J. Vahrenhold. Cs unplugged-how is it used, and does it work? Adventures between lower bounds and higher altitudes: essays dedicated to Juraj Hromkovi? on the occasion of his 60th birthday, pages 497--521, 2018.
[5]
T. Bell, I. H. Witten, and M. Fellows. Computer science unplugged, 2002.
[6]
R. Bommasani, D. A. Hudson, E. Adeli, R. Altman, S. Arora, S. von Arx, M. S. Bernstein, J. Bohg, A. Bosselut, E. Brunskill, et al. On the opportunities and risks of foundation models. arXiv preprint arXiv:2108.07258, 2021.
[7]
M. Celepkolu, E. O'Halloran, and K. E. Boyer. Upper elementary and middle grade teachers' perceptions, concerns, and goals for integrating cs into classrooms. In Proceedings of the 51st ACM technical symposium on computer science education, pages 965--970, 2020.
[8]
Y. Cheng. Mean shift, mode seeking, and clustering. IEEE transactions on pattern analysis and machine intelligence, 17(8):790--799, 1995.
[9]
G. Cohen, S. Afshar, J. Tapson, and A. Van Schaik. Emnist: Extending mnist to handwritten letters. In 2017 international joint conference on neural networks (IJCNN), pages 2921--2926. IEEE, 2017.
[10]
D. Comaniciu and P. Meer. Mean shift: A robust approach toward feature space analysis. IEEE Transactions on pattern analysis and machine intelligence, 24(5):603-- 619, 2002.
[11]
E. F. d'Albe. On a type-reading optophone. Proceedings of the Royal Society of London. Series A, Containing Papers of a Mathematical and Physical Character, 90(619):373--375, 1914.
[12]
W. Du. Code runner: Solution for recognition and execution of handwritten code. Standford University, pages 1--5, 2012.
[13]
M. Ehtesham-Ul-Haque, S. M. Monsur, and S. M. Billah. Grid-coding: An accessible, efficient, and structured coding paradigm for blind and low-vision programmers. In Proceedings of the 35th Annual ACM Symposium on User Interface Software and Technology, pages 1--21, 2022.
[14]
H. Herbert. The history of ocr, optical character recognition. Manchester Center, VT: Recognition Technologies Users Association, 1982.
[15]
W. Hu, Y. Xu, Y. Li, W. Li, Z. Chen, and Z. Tu. Bliva: A simple multimodal llm for better handling of text-rich visual questions. arXiv preprint arXiv:2308.09936, 2023.
[16]
D. Keysers, T. Deselaers, H. A. Rowley, L.-L. Wang, and V. Carbune. Multilanguage online handwriting recognition. IEEE transactions on pattern analysis and machine intelligence, 39(6):1180--1194, 2016.
[17]
S.-C. Kong, M. Lai, and D. Sun. Teacher development in computational thinking: Design and learning outcomes of programming concepts, practices and pedagogy. Computers & Education, 151:103872, 2020.
[18]
M. Kumar, M. Jindal, and R. Sharma. Review on ocr for handwritten indian scripts character recognition. In International Conference on Digital Image Processing and Information Technology, pages 268--276. Springer, 2011.
[19]
Y. Liu, Z. Li, H. Li, W. Yu, M. Huang, D. Peng, M. Liu, M. Chen, C. Li, L. Jin, et al. On the hidden mystery of ocr in large multimodal models. arXiv preprint arXiv:2305.07895, 2023.
[20]
A. Malkadi, M. Alahmadi, and S. Haiduc. A study on the accuracy of ocr engines for source code transcription from programming screencasts. In Proceedings of the 17th International Conference on Mining Software Repositories, pages 65--75, 2020.
[21]
L. A. Manwell, M. Tadros, T. M. Ciccarelli, and R. Eikelboom. Digital dementia in the internet generation: excessive screen time during brain development will increase the risk of alzheimer's disease and related dementias in adulthood. Journal of Integrative Neuroscience, 21(1):28, 2022.
[22]
J. Memon, M. Sami, R. A. Khan, and M. Uddin. Handwritten optical character recognition (ocr): A comprehensive systematic literature review (slr). IEEE Access, 8:142642--142668, 2020.
[23]
S. Mori, C. Y. Suen, and K. Yamamoto. Historical review of ocr research and development. Proceedings of the IEEE, 80(7):1029--1058, 1992.
[24]
G. Nagy. At the frontiers of ocr. Proceedings of the IEEE, 80(7):1093--1100, 1992.
[25]
S. R. Narang, M. K. Jindal, and M. Kumar. Ancient text recognition: a review. Artificial Intelligence Review, 53:5517--5558, 2020.
[26]
E. Ose Askvik, F. Van derWeel, and A. L. van der Meer. The importance of cursive handwriting over typewriting for learning in the classroom: A high-density eeg study of 12-year-old children and young adults. Frontiers in Psychology, 11:550116, 2020.
[27]
C. Piech, A. Malik, K. Jue, and M. Sahami. Code in place: Online section leading for scalable human-centered learning. In Proceedings of the 52nd ACM Technical Symposium on Computer Science Education (SIGCSE '21), page 7, New York, NY, USA, 2021. ACM.
[28]
E. Relkin, L. E. de Ruiter, and M. U. Bers. Learning to code and the acquisition of computational thinking by young children. Computers & education, 169:104222, 2021.
[29]
Y. Shi, D. Peng, W. Liao, Z. Lin, X. Chen, C. Liu, Y. Zhang, and L. Jin. Exploring ocr capabilities of gpt-4v (ision): A quantitative and in-depth evaluation. arXiv preprint arXiv:2310.16809, 2023.
[30]
T. J. Smoker, C. E. Murphy, and A. K. Rockwell. Comparing memory for handwriting versus typing. In Proceedings of the Human Factors and Ergonomics Society Annual Meeting, volume 53, pages 1744--1747. SAGE Publications Sage CA: Los Angeles, CA, 2009.
[31]
S. N. Srihari, S.-H. Cha, H. Arora, and S. Lee. Individuality of handwriting. Journal of forensic sciences, 47(4):856--872, 2002.
[32]
N. Stiglic and R. M. Viner. Effects of screentime on the health and well-being of children and adolescents: a systematic review of reviews. BMJ open, 9(1):e023191, 2019.
[33]
L. Sun, L. Hu, and D. Zhou. Improving 7th-graders' computational thinking skills through unplugged programming activities: A study on the influence of multiple factors. Thinking Skills and Creativity, 42:100926, 2021.
[34]
Unknown Author. Handwritten code scanner. https://devfolio.co/projects/ handwritten-code-scanner-414f, 2021. Accessed: 2024-02--12.
[35]
L. Yujian and L. Bo. A normalized levenshtein distance metric. IEEE transactions on pattern analysis and machine intelligence, 29(6):1091--1095, 2007.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
L@S '24: Proceedings of the Eleventh ACM Conference on Learning @ Scale
July 2024
582 pages
ISBN:9798400706332
DOI:10.1145/3657604
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 15 July 2024

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. artificial intelligence
  2. cs education
  3. handwriting ocr
  4. machine learning

Qualifiers

  • Research-article

Funding Sources

  • Carina Initiatives, Inc.(CARINA)

Conference

L@S '24

Acceptance Rates

Overall Acceptance Rate 117 of 440 submissions, 27%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 154
    Total Downloads
  • Downloads (Last 12 months)154
  • Downloads (Last 6 weeks)22
Reflects downloads up to 03 Oct 2024

Other Metrics

Citations

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media