Skip to content

Commit

Permalink
API and .NET SDK 1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Attila Laszlo committed Feb 1, 2017
1 parent e7ff78c commit e009fde
Show file tree
Hide file tree
Showing 63 changed files with 1,438 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/DevelopersSite/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.7.4",
"version": "1.8.0",
"dependencies": {
"Microsoft.AspNetCore.Diagnostics": "1.1.0",
"Microsoft.AspNetCore.Mvc": "1.1.0",
Expand Down
3 changes: 2 additions & 1 deletion src/DevelopersSite/wwwroot/css/site.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@charset "UTF-8";
@charset "UTF-8";
/*!
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
Expand Down Expand Up @@ -6626,3 +6626,4 @@ section.footer {
text-align: center; }
section.footer .legal p {
font-size: 12px; }

9 changes: 2 additions & 7 deletions src/DevelopersSite/wwwroot/css/site.min.css

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6055,6 +6055,26 @@ <h3 class="panel-title"><a name="/definitions/ClassifierRecommendationRequest"><

</div>
</dd>
<dt data-property-name="ParentTagIdList">
<span class="json-property-name">ParentTagIdList:</span>
<span class="json-property-type">string[]</span>
<span class="json-property-range" title="Value limits"></span>

</dt>
<dd>
<p>The recommendation process will be used only tags by these parent(s)</p>

<div class="json-inner-schema">

<section class="json-schema-array-items">
<span class="json-property-type">string</span>
<span class="json-property-range" title="Value limits"></span>

<div class="json-inner-schema">

</div>
</section> </div>
</dd>
</dl>
</section>
</div>
Expand Down Expand Up @@ -9175,7 +9195,7 @@ <h3 class="panel-title"><a name="/definitions/SearchSettings"></a>SearchSettings

</dt>
<dd>
<p>Interpreted as a Levenshtein Edit Distance — the number of one character changes that need to be made to one string to make it the same as another string. Can be specified as: -1 (generates an edit distance based on the length of the term) or 0, 1, 2 (the maximum allowed Levenshtein Edit Distance)</p>
<p>Interpreted as a Levenshtein Edit Distance — the number of one character changes that need to be made to one string to make it the same as another string. Can be specified as: -1 (generates an edit distance based on the length of the term) or 0, 1, 2 (the maximum allowed Levenshtein Edit Distance)</p>

<div class="json-inner-schema">

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,18 @@ <h3 id="managing-tags">Managing tags</h3>
<p>To export all the words from your database for further analysis, click the <code>Export Words</code> button; a long-term process starts.</p>
</blockquote>
<h2 id="services-panel">Services panel</h2>
<p>Main panel for service management. List, create and manage your available services. Currently, Slamby supports two type of services:</p>
<p>Main panel for service management. List, create and manage your available services. Currently, Slamby supports the following type of services:</p>
<ul>
<li><p>Slamby Classifier Service,</p>
<li><p>Classifier,</p>
</li>
<li><p>Slamby PRC Service.</p>
<li><p>PRC,</p>
</li>
<li><p>Search.</p>
</li>
</ul>
<p><code>Slamby Classifier Service</code> is a text-classification service with high accuracy level and language independence. Specialized for e-commerce text-classification and category-recommendation for thousands of categories.</p>
<p><code>Slamby PRC Service</code> is a text-based matchmaking service for matchmaking, keyword extraction, and duplicate finding.</p>
<p><code>Classifier service</code> is a text-classification service with high accuracy level and language independence. Specialized for e-commerce text-classification and category-recommendation for thousands of categories.</p>
<p><code>PRC service</code> is a text-based matchmaking service for matchmaking, keyword extraction, and duplicate finding.</p>
<p><code>Search service</code> is a smart search service, creating powerful search engine. Elastic Search engine, built-in typo fixing, category recommendation, wide-range of customization.</p>
<p>To create a service click the add new service button by selecting the required service type.</p>
<p>Each service has 3 state depends on the preparation and activation status:</p>
<ul>
Expand Down Expand Up @@ -476,6 +479,17 @@ <h3 id="keywords-extraction-for-prc-service">Keywords extraction for PRC Service
</tbody>
</table>
<p><img src="img/keywords-prc-service.png" alt="Keywords PRC Service"></p>
<h3 id="add-search-service">Add Search service</h3>
<p><img src="img/add-search-service.png" alt="Add search service"></p>
<h3 id="prepare-search-service">Prepare Search service</h3>
<p><img src="img/prepare-search-service.png" alt="Prepare search service"></p>
<h3 id="activate-search-service">Activate Search service</h3>
<p><img src="img/activate-search-service.png" alt="Activate search service"></p>
<p><img src="img/activate-search-service-ac-settings.png" alt="Search service activation auto-complete settings"></p>
<p><img src="img/activate-search-service-classifier-settings.png" alt="Search service activation classifier service settings"></p>
<p><img src="img/activate-search-service-search-settings.png" alt="Search service activation search settings"></p>
<h3 id="using-search">Using Search</h3>
<p><img src="img/search.png" alt="Search service: search"></p>
<h2 id="processes">Processes</h2>
<p>Using Slamby API server all the long-term jobs are organized into background processes. Such as dataset copy or classifier service training are managed using background processes.</p>
<p>Open processes double click on the processes menu.</p>
Expand Down
32 changes: 32 additions & 0 deletions src/DevelopersSite/wwwroot/documents/SDK.NET/v1.5.0/dataset.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<h2 id="dataset">Dataset</h2>
<p>Slamby provides <strong>Dataset</strong> as a data storage. A dataset is a JSON document storage that allows to store schema free JSON objects, indexes and additional parameters. Inside your server you can create and manage multiple datasets.</p>
<p>You can find more details about the Datasets <a href="/docs/api/{{docversion}}/dataset">here.</a></p>
<h3 id="create-new-dataset">Create new Dataset</h3>
<p>Create a new dataset by providing a sample JSON document and additional parameters.</p>
<p><em>Example:</em></p>
<pre><code class="lang-cs"><span class="hljs-keyword">var</span> manager = <span class="hljs-keyword">new</span> DataSetManager(configuration);<br><span class="hljs-keyword">var</span> dataset = <span class="hljs-keyword">new</span> Models.DataSet()<br> {<br> IdField = <span class="hljs-string">"id"</span>,<br> Name = <span class="hljs-string">"name"</span>,<br> NGramCount = <span class="hljs-number">2</span>,<br> InterpretedFields = <span class="hljs-keyword">new</span> List&lt;<span class="hljs-keyword">string</span>&gt; { <span class="hljs-string">"title"</span>, <span class="hljs-string">"desc"</span> },<br> TagField = <span class="hljs-string">"tag"</span>,<br> SampleDocument = <span class="hljs-keyword">new</span><br> {<br> id = <span class="hljs-number">10</span>,<br> title = <span class="hljs-string">"Example Product Title"</span>,<br> desc = <span class="hljs-string">"Example Product Description"</span>,<br> tag = [<span class="hljs-number">1</span>,<span class="hljs-number">2</span>,<span class="hljs-number">3</span>]<br> }<br> }<br><span class="hljs-keyword">var</span> response = <span class="hljs-keyword">await</span> manager.CreateDataSetAsync(dataset);<br><span class="hljs-keyword">if</span> (!response.IsSuccessful)<br>{<br> <span class="hljs-comment">// handle error with the help of the Errors property in the response</span><br>}
</code></pre>
<p>Create a new dataset by providing a JSON schema and additional parameters.</p>
<p><em>Example:</em></p>
<pre><code class="lang-cs"><span class="hljs-keyword">var</span> manager = <span class="hljs-keyword">new</span> DataSetManager(configuration);<br><span class="hljs-keyword">var</span> dataset = <span class="hljs-keyword">new</span> Models.DataSet<br> {<br> IdField = <span class="hljs-string">"id"</span>,<br> Name = <span class="hljs-string">"name"</span>,<br> NGramCount = <span class="hljs-number">2</span>,<br> InterpretedFields = <span class="hljs-keyword">new</span> List&lt;<span class="hljs-keyword">string</span>&gt; { <span class="hljs-string">"title"</span>, <span class="hljs-string">"desc"</span> },<br> TagField = <span class="hljs-string">"tag"</span>,<br> Schema = <span class="hljs-keyword">new</span><br> {<br> id = <span class="hljs-keyword">new</span> <br> {<br> type = <span class="hljs-string">"integer"</span><br> },<br> title = <span class="hljs-keyword">new</span> <br> {<br> type = <span class="hljs-string">"string"</span><br> },<br> desc = <span class="hljs-keyword">new</span> <br> {<br> type = <span class="hljs-string">"string"</span><br> },<br> tag = <span class="hljs-keyword">new</span> <br> {<br> type = <span class="hljs-string">"array"</span>,<br> items = <span class="hljs-keyword">new</span><br> {<br> type = <span class="hljs-string">"byte"</span><br> }<br> }<br> }<br> }<br><span class="hljs-keyword">var</span> response = <span class="hljs-keyword">await</span> manager.CreateDataSchemaSetAsync(dataset);<br><span class="hljs-keyword">if</span> (!response.IsSuccessful)<br>{<br> <span class="hljs-comment">// handle error with the help of the Errors property in the response</span><br>}
</code></pre>
<h3 id="get-dataset">Get Dataset</h3>
<p>Get information about a given dataset. A dataset can be accessed by its name.</p>
<p><em>Example:</em></p>
<pre><code class="lang-cs"><span class="hljs-keyword">var</span> manager = <span class="hljs-keyword">new</span> DataSetManager(configuration);<br><span class="hljs-keyword">var</span> dataset = <span class="hljs-keyword">await</span> manager.GetDataSetAsync();
</code></pre>
<h3 id="get-dataset-list">Get Dataset List</h3>
<p>Get a list of the available datasets.</p>
<p><em>Example:</em></p>
<pre><code class="lang-cs"><span class="hljs-keyword">var</span> manager = <span class="hljs-keyword">new</span> DataSetManager(configuration);<br><span class="hljs-keyword">var</span> datasets = <span class="hljs-keyword">await</span> manager.GetDataSetsAsync();
</code></pre>
<h3 id="update-dataset">Update Dataset</h3>
<p>Updates a dataset. Currently only updating Dataset name is possible. As Dataset names are unique it will return with an error if the name is taken by another Dataset.</p>
<p><em>Example:</em></p>
<pre><code class="lang-cs"><span class="hljs-keyword">var</span> manager = <span class="hljs-keyword">new</span> DataSetManager(configuration);<br><span class="hljs-keyword">var</span> model = <span class="hljs-keyword">new</span> DataSetUpdate()<br>{<br> Name = <span class="hljs-string">"NEW_DATASET_NAME"</span><br>};<br><span class="hljs-keyword">var</span> datasets = <span class="hljs-keyword">await</span> manager.UpdateDataSetAsync(model);
</code></pre>
<h3 id="remove-dataset">Remove Dataset</h3>
<p>Removes a given dataset. All the stored data will be removed.</p>
<p><em>Example:</em></p>
<pre><code class="lang-cs"><span class="hljs-keyword">var</span> manager = <span class="hljs-keyword">new</span> DataSetManager(configuration);<br><span class="hljs-keyword">var</span> result = <span class="hljs-keyword">await</span> manager.DeleteDataSetAsync(<span class="hljs-string">"DATASET_NAME"</span>);
</code></pre>
128 changes: 128 additions & 0 deletions src/DevelopersSite/wwwroot/documents/SDK.NET/v1.5.0/dataset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
## Dataset

Slamby provides **Dataset** as a data storage. A dataset is a JSON document storage that allows to store schema free JSON objects, indexes and additional parameters. Inside your server you can create and manage multiple datasets.

You can find more details about the Datasets [here.](/docs/api/{{docversion}}/dataset)

### Create new Dataset

Create a new dataset by providing a sample JSON document and additional parameters.

_Example:_

```cs
var manager = new DataSetManager(configuration);
var dataset = new Models.DataSet()
{
IdField = "id",
Name = "name",
NGramCount = 2,
InterpretedFields = new List<string> { "title", "desc" },
TagField = "tag",
SampleDocument = new
{
id = 10,
title = "Example Product Title",
desc = "Example Product Description",
tag = [1,2,3]
}
}
var response = await manager.CreateDataSetAsync(dataset);
if (!response.IsSuccessful)
{
// handle error with the help of the Errors property in the response
}
```

Create a new dataset by providing a JSON schema and additional parameters.

_Example:_

```cs
var manager = new DataSetManager(configuration);
var dataset = new Models.DataSet
{
IdField = "id",
Name = "name",
NGramCount = 2,
InterpretedFields = new List<string> { "title", "desc" },
TagField = "tag",
Schema = new
{
id = new
{
type = "integer"
},
title = new
{
type = "string"
},
desc = new
{
type = "string"
},
tag = new
{
type = "array",
items = new
{
type = "byte"
}
}
}
}
var response = await manager.CreateDataSchemaSetAsync(dataset);
if (!response.IsSuccessful)
{
// handle error with the help of the Errors property in the response
}
```

### Get Dataset

Get information about a given dataset. A dataset can be accessed by its name.

_Example:_

```cs
var manager = new DataSetManager(configuration);
var dataset = await manager.GetDataSetAsync();
```

### Get Dataset List

Get a list of the available datasets.

_Example:_

```cs
var manager = new DataSetManager(configuration);
var datasets = await manager.GetDataSetsAsync();
```

### Update Dataset

Updates a dataset. Currently only updating Dataset name is possible. As Dataset names are unique it will return with an error if the name is taken by another Dataset.

_Example:_

```cs
var manager = new DataSetManager(configuration);
var model = new DataSetUpdate()
{
Name = "NEW_DATASET_NAME"
};
var datasets = await manager.UpdateDataSetAsync(model);
```


### Remove Dataset

Removes a given dataset. All the stored data will be removed.

_Example:_

```cs
var manager = new DataSetManager(configuration);
var result = await manager.DeleteDataSetAsync("DATASET_NAME");
```
Loading

0 comments on commit e009fde

Please sign in to comment.