-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swig wrapper for apertium-tagger #52
Swig wrapper for apertium-tagger #52
Conversation
Was the rename necessary? It's kind of annoying that Git isn't recognizing the rename. Any thoughts on that? Moreover it seems like we're going against the convention now since the |
I though it would be better to have the
Its probably showing all the changes, and doesn't recognize renaming as a part of it, might be due to editing the header gaurds after renaming the file. It do recognize file rename 52a32a5.
I've kept the |
Ah, okay. That all makes sense. Why were the headers moved from the Also, is it necessary that all these source files are included? i.e. https://github.com/apertium/apertium/pull/52/files?file-filters%5B%5D=.cc&file-filters%5B%5D=.h&file-filters%5B%5D=.i&file-filters%5B%5D=.in#diff-9e56523df55a28867873fdee4107aebbR22. e.g. what is |
Since I've added these files in
Yes, I had to lookup all the undefined objects in shared object and I included all the required files.
Its required for operator overloading. Also |
Standard convention is to add includes in the
I see. This wasn't necessary before (for any of the other wrappers, that is)? Does it have something to do with you moving the includes?
Ah. Odd name... |
I'll check their dependencies on swig and move them back to the .cc file. Should I fix this as well https://github.com/apertium/apertium/blob/master/apertium/pretransfer.cc#L1
These are dependencies for |
Ah, yes. That would be ideal. My bad for not noticing the issue earlier.
Hmm, I see. Maybe we should separate the dependencies in the Python file with comments? |
.h has headers required for prototyping .cc has headers required for definition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some notes. Mostly nits.
@Vaydheesh can you bring changes from |
Are these commands the required for updating my branch? Where upstream points to apertium-master and origin is my fork.
|
It looks right. There should be lots of instructions on the web re. updating a fork's branch. |
Should I also add |
Huh? The |
I don't think that it would check for importing the wrapper. |
Oh, are you suggesting adding more tests? If so, go ahead! |
Removed: const qualifier from Apertium::basic_Tagger::Flags and derived classes
Oh wow. I didn't realize this many functions were |
I have added the script in |
Don't you need to execute make test in the subfolder as well? Not too familiar with autotools but I can look more into it if you're unable to figure it out. Regardless, I don't consider it a blocker. More concerned with the diff that removes const qualifiers. |
057518b
to
7bebb08
Compare
I tried but can't use the python import, so I've reverted back to previous state |
You could probably tackle this by forcing the distro Python version: https://docs.travis-ci.com/user/languages/python/#travis-ci-uses-isolated-virtualenvs. Not too worried about it though. |
@@ -26,7 +26,7 @@ namespace Apertium { | |||
class Stream_5_3_3_TaggerTrainer : private basic_5_3_3_Tagger, | |||
public basic_StreamTaggerTrainer { | |||
public: | |||
Stream_5_3_3_TaggerTrainer(const Flags &Flags_); | |||
Stream_5_3_3_TaggerTrainer(Flags &Flags_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and others don't seem necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started with basic_tagger.h
, and made changes according to the errors reported
Error without the changes stream_5_3_3_tagger_trainer.cc:30:20: error: binding reference of type ‘Apertium::basic_Tagger::Flags&’ to ‘const Apertium::basic_Tagger::Flags’ discards qualifiers
The entire command is passed to the
apertium_tagger
constructoroptind=1
in the constructor to ensure multiple instances ofapertium_tagger
can be created.