SkillAgentSearch skills...

Text2math

Code for the paper ``Text2Math: End-to-end Parsing Text into Math Expressions" accepted by EMNLP 2019

Install / Use

/learn @zoezou2015/Text2math
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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

View on GitHub
GitHub Stars16
CategoryDevelopment
Updated2y ago
Forks3

Languages

Java

Security Score

60/100

Audited on Jan 28, 2024

No findings