ocreval icon indicating copy to clipboard operation
ocreval copied to clipboard

Python bindings?

Open jtlz2 opened this issue 6 years ago • 2 comments

Hi again @eddieantonio this is a huge ask - do you know of, would you consider developing, or would anyone reading from the community consider writing, python bindings to libocreval?

I have looked into this a little bit (SWIG etc.) but my C is far from fluent, I ran into an issue, and while I could (and still might) attempt it it would be a massive learning curve at this stage. With libocreval.so and all the headers there it should of course be doable for the expert.

Sorry again to ask but just wondered if you had at least had any thoughts on this topic.

Thanks again

jtlz2 avatar Sep 16 '19 11:09 jtlz2

Hey @jtlz2!

This isn't actually too unreasonable to do, especially with ctypes. This would allow for a slow, but easy to maintain wrapper of libocreval.so. There is the issue in that all of the functionality is not actually implemented within libocreval.so — some functionality is implemented in the individual commands' source file.

Are there any commands in particular you'd like to have Python bindings for? I like accuracy and wordacc.

eddieantonio avatar Sep 16 '19 21:09 eddieantonio

@eddieantonio That would be amazing - thank you!

I had noticed that some of the functionality is in the source files.

I fully agree with accuracy and wordacc - though I'm sure once those are in place others will be asked for by the community...

The input for those two would be two strings, but the output would be some quite complicated structures, no?

Let me know if and how I can help / testing etc.

Huge thanks again!

jtlz2 avatar Sep 17 '19 06:09 jtlz2