Skip to content
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

Update ffi and kotlin bindings #136

Merged
merged 2 commits into from
Apr 5, 2019
Merged

Update ffi and kotlin bindings #136

merged 2 commits into from
Apr 5, 2019

Conversation

adrienball
Copy link
Collaborator

Description

  • Add a CIntentClassifierResultList objet to the ffi, which is used in the get_intents API of snips-nlu-rs
  • kotlin wrapper: allow to pass a Pointer when creating a CIntentClassifierResult or CSlots object

@adrienball adrienball requested a review from fredszaq April 5, 2019 12:43
override fun getFieldOrder() = listOf("intent_name", "confidence_score")

fun toIntentClassifierResult() = IntentClassifierResult(intentName = intent_name?.readString(),
confidenceScore = confidence_score!!)
}

class CSlots : Structure(), Structure.ByReference {
class CIntentClassifierResultList(p: Pointer?) : Structure(p), Structure.ByReference {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name it CIntentClassifierResults to follow the exisiting convention ? (we use s in nlu ontology and Array in hermes... let's not introduce a new one)

@fredszaq
Copy link
Contributor

fredszaq commented Apr 5, 2019

LGTM

@adrienball adrienball merged commit 6951f71 into develop Apr 5, 2019
@adrienball adrienball deleted the task/update-bindings branch April 5, 2019 13:13
@adrienball adrienball mentioned this pull request Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants