The SUSI skill CMS is an editor to write and edit skill easily. It follows an API-centric approach where the SUSI server acts as API server and a web front-end act as the client for the API and provides the user interface. A skill is a set of intents. One text file represents one skill, it may contain several intents which all belong together. All the skills are stored in SUSI Skill Data repository and the schema is Models -> Groups -> Languages -> Skill -> Intents.
To get the list of all the languages stored in Susi Skill Data repository, we used the endpoint provided by SUSI Server.
The getMinimalBaseRole method tells the minimum Userrole required to access this servlet it can also be ADMIN, USER. In our case it is Anonymous. A User need not to log in to access this endpoint.
One can access based on model and group. We can get the required parameters through call.get() method where first parameter is the key for which we want to get the value and second parameter is the default value. We make a json array of languages ISO codes and send it as a response for this endpoint.
Next, to display the actual name we used a ISO-639-1 npm package for language name translation from their respective codes.
Next we use getAlllanguages.json endpoint of Susi_server
and make an Ajax network call to get the ISO codes from the above endpoints. We parses the response in data object, using ISO6391 npm package we added the native language name in the drop down for the languages. We defined a Universal language with code ‘xx’, for skills which is related to mathematical and computational problems.
This is how we added language’s native form in Susi skill CMS, To add more skills or modify the existing ones visit skills.susi.ai. For more information and complete code take a look at Susi server and Susi_Skill_cms and join gitter chat channel for discussions.