This version of the API is deprecated.
See collection.create for the current version of this method.corpus.createCorpus
Creates a new corpus (container to store articles and texts in) and returns an id for the created corpus. A corpus may only contain articles with the same language (i.e. only english texts in the corpus).
Request Parameters
| Corpus Name | String (required) |
Provide a name for your new corpus.
| Language | String (required) |
Specify what language the articles/texts that will be stored in the corpus are written in. English and Swedish are supported and specified according to ISO 639-1 Swedish = "sv", English = "en".
| Corpus Description | String |
Provide a description for your new corpus. Use something that describes what the corpus contains (i.e. English blog posts from my personal blog)
Response Parameters
| corpusId | int |
A unique id for your newly created corpus.
Code Examples
JSON
//Request
{
"method":"corpus.createCorpus",
"params":["MyApp corpus", "English blog posts from my personal blog", "en"],
"id":2
}
//Response
{"id":2,"result":{"corpusId":45}}
Notes
- A corpus is a container to store articles and texts in.
- A corpus can only store text for the language it is created for.