Text2math
Code for the paper ``Text2Math: End-to-end Parsing Text into Math Expressions" accepted by EMNLP 2019
Install / Use
/learn @zoezou2015/Text2mathREADME
The StatNLP Semantic Parser
Code for the paper ``Text2Math: End-to-end Parsing Text into Math Expressions" accepted by EMNLP 2019
Installation
Java 1.8
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
ZeroMQ
git clone https://github.com/zeromq/libzmq
cd libzmq
./autogen.sh && ./configure && make -j 4
make check && sudo make install && sudo ldconfig
JZMQ
git clone https://github.com/zeromq/jzmq
cd jzmq/jzmq-jni
./autogen.sh && ./configure && make
sudo make install
Torch dependency libraries
luarocks install lzmq
luarocks install lua-messagepack
luarocks install luautf8
A jar file in provided in bin/. One easy way to re-compile the code is to create a new project in Eclipse and export a runnable JAR file for the main classes: MathSolverMain and EquationParserMain.
Word embedding
Download the .pkl files from Polyglot. Put these files in neural_server/polyglot, then run the following to preprocess for Torch:
bash prepare_torch.sh
Reproducing the experimental results
The following script will run the text2math for two tasks over three datasets, respectively.
bash run_parser.sh
Run a neural net server that listens on port 5556 and specify the gpuid (>= 0 for GPU, -1 for CPU)
th server.lua -port 5556 -gpuid -1
Train the text2math with neural features for two tasks:
bash run_neural.sh
Cite
@InProceedings{zou-19-text2math,
author = {Zou, Yanyan and Lu, Wei},
title = {Text2Math: End-to-end Parsing Text into Math Expressions},
booktitle = {Proceedings of EMNLP},
year={2019}
}
## Contact
Yanyan Zou and Wei Lu, Singapore University of Technology and Design
Please feel free to drop an email at yanyan_zou@mymail.sutd.edu.sg for questions.
Related Skills
node-connect
341.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.6kCommit, push, and open a PR
