Prototype anaphora in C++
Closed this issue · 6 comments
prototype exists in Python (coding challenge). Need to write it in C++
Code Written in C++.
Need to deal with ambiguity in biltrans (if any).
Completed Code - Deals with Escaped Characters and Multiple TL entries as well.
Python Code takes 0.7 seconds (500 sentences) and this code takes 0.4 seconds for the same input.
Note: this is time taken in bash, including stdout, etc.
Also compared outputs of both codes and diff returns nothing. Now we can improve upon this code.
Going to make a makefile because parsing and anaphora code are in different files.
Makefile made. Officially done with making prototype in C++.
https://github.com/khannatanmai/apertium-anaphora/tree/master/anaphora-module
If you're timing, you might want to do more than 500 sentences, there's often some warmup period. And pipe output to /dev/null, everything is slow if it has to be printed
@unhammer I was just looking at the time comparatively. This time I put the output in a file to reduce that time.
if you are comparing timings, the different implementations might have different warmup times (I don't doubt the C++ is faster, but by running on different sized input you'll get some idea of what the warmup-time is vs fully-warmed-up lines-per-second rate is)