Add LUIS Adapter
cswendrowski opened this issue · 4 comments
Request
LUIS has an endpoint to batch add Labeled Utterances (https://westus.dev.cognitive.microsoft.com/docs/services/5890b47c39e2bb17b84a55ff/operations/5890b47c39e2bb052c5b9c09). LUIS uses the same data format to allow batch testing via their UI (https://docs.microsoft.com/en-us/azure/cognitive-services/LUIS/luis-how-to-batch-test)
It would be convenient to generate out Train and Test data in the LUIS format. LUIS supports synonyms via Phrase Lists and List Entities, but these are separate endpoints which would require different file outputs and therefore would be far more complicated to support.
Data
LUIS's data format is almost identical to the core of RASA's
RASA schema:
rasa_nlu_data: object
regex_features: []
entity_synonyms: []
common_examples: []
text: string
intent: string
entities: []
end: int
entity: string
start: int
value: string
LUIS schema:
(base) []
Text: string
Intent: string
Entities: []
Entity: string
StartPos: int
EndPos: int
Current thoughts on implementation
After taking a look at how the RASA adapter is implemented it seems like a pretty simple adjustment to make it output LUIS's format instead. I'm not sure how I would go about hooking that up into the rest of the system however
Thanks for the request @cswendrowski, you are mostly welcome to open a PR for review. Keeping an eye and supporting all NLU framework data formats takes more time than i've been able to provide so far... open source contributions are mostly welcome.
@rodrigopivi can you point me to the other files I will need to update to propagate the adapter changes through the rest of the codebase?
@cswendrowski you can start by creating a new adapter and using it with the CLI tool by importing it from file ./src/bin.ts
, add some tests (at generator.spec.ts and bin.spec.ts), and then add some documentation at readme.md.
If that is done, then the IDE integration is just a react app at web directory, i can update that later given that the first steps are done.
Done! Luis adapter is now available since v2.2.0