As a company working in research and development, we have much contact with universities and researchers. Many of those who work in universities are interested in this type of technology and calculations are often performed in the development environment called Matlab. For those not familiar with Matlab, it is a programming language and development environment that is specialized in making numerical calculations and is particularly good at doing matrix operations.
To make it easier for people working in Matlab to use text analysis, we have now created a client to connect and communicate with the Saplo Text Analysis API. The client is very dynamic and it’s easy to adapt it to the different features that exists in Saplo Text Analysis API.
To get started using Saplo text analysis API with Matlab all you need to do is follow this short guide.
1) Download the saplo4matlab client.
2) Signup for an API key and check your mailbox for your new key.
3) Open the downloaded file saploclient.m and add your API Key and Secret Key to the function saploRequest.
4) Run the file. Now it will create a new collection, add a text and get tags for that text.
5) Congratulations! You have just made your first calls to Saplo Text Analysis API through the Matlab client.
For a better understanding of the Matlab client I will describe how the client is designed to work.
Basically there is just one function that you need to know of, the saploRequest function. It takes 3 arguments:
1) the Saplo Text Analysis API method you want to use. The different methods are found on our API documentation site.
2) the parameters that the selected method takes. These are created as a struct.
3) the access token that was created when authorizing with the API. If you don’t provide a token the client handles it by it self (authorizing before making the request) but if you are creating a larger application with many calls after each other it’s good to provide the token as a param, then no time is wasted on authorization.
After you have made a saploRequest it will be sent to Saplo Text Analysis API which will return a response according to the method you requested. The response is a struct object. If anything goes wrong an error is raised from the API with an error code and a message.
Have fun using Saplo Text Analysis API with the Matlab client!