-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b0a1e72
commit 734d55f
Showing
7 changed files
with
408 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
--- | ||
# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. | ||
title: "Significance Reference" | ||
redirect_from: | ||
- /documentation/reference/significance-reference.html | ||
--- | ||
|
||
<p>Reference configuration for <a href="../embedding.html">embedders</a>.</p> | ||
|
||
<h2 id="model-config-reference">Model config reference</h2> | ||
<p> | ||
Significance model uses the <a href="config-files.html#model">model</a> type configuration. | ||
The <em>model</em> type configuration accepts attributes <code>model-id</code>, <code>url</code> or <code>path</code>, | ||
and multiple of these can be specified as a single config value. The model order determines the precedence for a given language - with the last element having the highest precedence. | ||
</p> | ||
<ul> | ||
<li>If a <code>model-id</code> is specified and the application is deployed on Vespa Cloud, the <code>model-id</code> is used.</li> | ||
<li>Otherwise, if a <code>url</code> is specified, it is used</li> | ||
<li>Otherwise, <code>path</code> is used.</li> | ||
</ul> | ||
<p> | ||
When using <code>path</code>, the model files must be supplied in the | ||
Vespa <a href="../application-packages.html#deploying-remote-models">application package</a>. | ||
</p> | ||
|
||
<h2 id="significance">Significance</h2> | ||
<p> | ||
A significance component is comprised of one or multiple significance models, for one or multiple languages. It uses these models' document frquencies to calculate the inverse document frequency (IDF) of terms in a query. | ||
</p> | ||
<p> | ||
The significance component is configured in <a href="services.html">services.xml</a>, with the <code>significance</code> tag: | ||
</p> | ||
|
||
<pre>{% highlight xml %} | ||
<container version="1.0"> | ||
<search> | ||
<significance> | ||
<model model-id="wikimedia"/> | ||
<model url="https://some/uri/bibel-multilingual.json" /> | ||
<model path="models/reddit-norge.no.json.zst" /> | ||
</significance> | ||
</search> | ||
</container> | ||
{% endhighlight %}</pre> | ||
|
||
<h3 id="significance-reference-config">Significance reference config</h3> | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th>Name</th> | ||
<th>Occurrence</th> | ||
<th>Description</th> | ||
<th>Type</th> | ||
<th>Default</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>model</td> | ||
<td>One To Many</td> | ||
<td>Use to point to the significance model file</td> | ||
<td><a href="#model-config-reference">model-type</a></td> | ||
<td>N/A</td> | ||
</tr> | ||
|
||
</tbody> | ||
</table> | ||
|
||
|
||
<h2>Significance Model File format</h2> | ||
|
||
<p> | ||
The significance model file is a JSON file with the following format: | ||
<pre>{% highlight json %} | ||
{ | ||
"version": 1, | ||
"id": "wikipedia", | ||
"description": "Some optional description", | ||
"languages": { | ||
"en": { | ||
"description": "Some optional description for English model", | ||
"document-count": 1000, | ||
"document-frequencies": { | ||
"and": 500, | ||
"car": 100, | ||
... | ||
} | ||
}, | ||
"no": { | ||
"description": "Some optional description for Norwegian model", | ||
"document-count": 800, | ||
"document-frequencies": { | ||
"bil": 80, | ||
"og": 400, | ||
... | ||
} | ||
} | ||
} | ||
} | ||
{% endhighlight %} | ||
</pre> | ||
</p> | ||
<p> | ||
Each file contains a map of languages and their document frequencies. | ||
|
||
</p> | ||
|
Oops, something went wrong.