# Dictionaries servers

{% hint style="warning" %}
Using Remède as a DICT client is **only available for Android devices**. See more : [#support](#support "mention").
{% endhint %}

### What is a dictionary server

The Dictionary Server Protocol (DICT) is a TCP based protocol which allows a client to access dictionary definitions from a set of dictionary databases. See [RFC2229](https://www.rfc-editor.org/rfc/rfc2229).

You can find a large amount of dictionary servers, that contains dictionaries about various topics.

### How to explore servers from Remède ?

You can browse dictionary servers from the "DICT Client" page in Remède. This page is more a testing purpose page than a way to browse dictionaries servers. It allows you to test servers connectivity and functionalities, with a logs page ect...

To use dictionaries servers as a search method in Remède, see [#how-to-set-a-dictionary-server-as-a-primary-dictionary](#how-to-set-a-dictionary-server-as-a-primary-dictionary "mention")

<details>

<summary>The server address field</summary>

On the DICT Client page, you can see two fields at the top of the page. The first one should indicate the DICT server address.\
![](https://2473908365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlM8TiZrN50jz0hj14dYA%2Fuploads%2FYz680SnhiyjQuMbXCgGh%2Fimage.png?alt=media\&token=1489fa03-cd9e-45ae-94e6-8ca00e576378)

The left part contains the hostname; a domain name or an IP address; and the second part is the server port. The default port for the DICT Protocol is 2628.

You can select a server from your saved servers or the default server directory by clicking the compass icon.

</details>

<details>

<summary>The search field, and search options</summary>

Below the server address field, you can see the search field. Use it to make a query to the dictionary server.

![](https://2473908365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlM8TiZrN50jz0hj14dYA%2Fuploads%2FeFfqqdWuZbJ3Hrur62Px%2Fimage.png?alt=media\&token=c26208ac-7f3c-4f67-a26b-3626c0c9c3c5)

For more search options, click the filter icon at the right. You can now see the options page. You can select the dictionary to use (or choose to search in all dictionary), and the search method.

![](https://2473908365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlM8TiZrN50jz0hj14dYA%2Fuploads%2FDI5I9NxAtvnkhIb8aC7n%2Fimage.png?alt=media\&token=f0a193f5-745f-4880-8fa2-b8f9510c5a6b)

* The DEFINE method will return the definitions of the words
* Whereas the MATCH method will return a list of word matching the requested pattern. The search pattern is what you enter into the search field.
  * The use of the MATCH method require a STRATEGY. The STRATEGY specify how do you want to match your pattern: REGular EXpression, starts with (preffix), ends with (suffixe) ect...

</details>

<details>

<summary>The logs page</summary>

For debugging purposes, you can open the logs page. It shows the raw transmission between Remède and the dictionary server.

![](https://2473908365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlM8TiZrN50jz0hj14dYA%2Fuploads%2FEtbKrOe9yh6uRbQnYDgX%2Fimage.png?alt=media\&token=cf50d400-ce8a-4cbe-a7a0-13d87bc62b4c)

</details>

### How to set a dictionary server as a "primary" dictionary ?

Setting a dictionary server as "primary" will let you browse it directly from the home page and see a word's definitions.

{% stepper %}
{% step %}

### Go to the settings page

Using the menu, switch to the settings page. Then, click switch to the DICT servers page.

<div align="left"><figure><img src="https://2473908365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlM8TiZrN50jz0hj14dYA%2Fuploads%2F1703iOH1NqsEv8Ycqu6A%2Fimage.png?alt=media&#x26;token=4b4675cc-0b21-486c-95fe-636e94fbda21" alt="" width="206"><figcaption><p>App menu</p></figcaption></figure> <figure><img src="https://2473908365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlM8TiZrN50jz0hj14dYA%2Fuploads%2FCMlu6a1nMIFR86csE3xS%2Fimage.png?alt=media&#x26;token=d60d7067-b698-4905-a22d-d9bccc2d411e" alt="" width="188"><figcaption><p>Settings page</p></figcaption></figure></div>
{% endstep %}

{% step %}

### Add a dictionary server

You can add your owns dictionary servers using the "Add a server button".

<div align="left"><figure><img src="https://2473908365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlM8TiZrN50jz0hj14dYA%2Fuploads%2F2Fl8YGnymmbDUZpKxjib%2Fimage.png?alt=media&#x26;token=cc45a598-cfe0-46f6-b3bc-64dde755dc81" alt="" width="188"><figcaption><p>DICT servers settings</p></figcaption></figure> <figure><img src="https://2473908365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlM8TiZrN50jz0hj14dYA%2Fuploads%2F0NC9AyPYE0Eb1JTJDWnh%2Fimage.png?alt=media&#x26;token=64c0f7c2-6b52-4b79-8c21-07a67e158ea4" alt="" width="188"><figcaption><p>Add server modal</p></figcaption></figure></div>
{% endstep %}

{% step %}

### Enable "search from DICT servers" and turn on desired servers

<div align="left"><figure><img src="https://2473908365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlM8TiZrN50jz0hj14dYA%2Fuploads%2FTnd6dydvYjNstXo7uzt7%2Fimage.png?alt=media&#x26;token=e90ee024-22a1-4823-9578-7793ddd221d2" alt="" width="188"><figcaption><p>DICT server search enabled</p></figcaption></figure> <figure><img src="https://2473908365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlM8TiZrN50jz0hj14dYA%2Fuploads%2FH2tbVBxlqS4CvhxnN2kO%2Fimage.png?alt=media&#x26;token=a262eec1-3144-4b34-bae3-01c7ded1dbee" alt="" width="188"><figcaption><p>Wanted servers enabled</p></figcaption></figure></div>
{% endstep %}

{% step %}

### Select "DICT servers" as search source and start browsing dictionaries servers !

<div align="left"><figure><img src="https://2473908365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlM8TiZrN50jz0hj14dYA%2Fuploads%2FIcYKUHdK5CO7Go24HnA8%2Fimage.png?alt=media&#x26;token=c69d2e27-63e4-41b4-889a-899bcc86ff91" alt="" width="188"><figcaption><p>Search source selection</p></figcaption></figure> <figure><img src="https://2473908365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlM8TiZrN50jz0hj14dYA%2Fuploads%2FFFYW3eRPt0iOBjhugG0p%2Fimage.png?alt=media&#x26;token=4ee42ed0-3130-489e-8070-35e65c7b5a01" alt="" width="188"><figcaption><p>Browsing DICT servers from Remède !</p></figcaption></figure> <figure><img src="https://2473908365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlM8TiZrN50jz0hj14dYA%2Fuploads%2FlLb024RvUXqLCDXfynHW%2Fimage.png?alt=media&#x26;token=046ad7df-028b-4eea-84b0-6fd2cf56d982" alt="" width="188"><figcaption><p>Simplified definition page</p></figcaption></figure></div>
{% endstep %}
{% endstepper %}

### Support

| Device                  | Support              | Method                                 |
| ----------------------- | -------------------- | -------------------------------------- |
| :green\_circle: Android | :white\_check\_mark: | Native TCP request client, with Java.  |
| :apple: iOS             | :x:                  | Future : With a proxy owned by Remède. |
| :desktop: Desktop       | :x:                  | Future : With a proxy owned by Remède. |

The support of this functionality is limited because the DICT protocol is based on the TCP protocol. Remède is powered by web technologies (Javascript, HTML, CSS), and Javascript does not allows us to use TCP Sockets. The only two methods are to write a TCP Socket client with native code (like we do for Android) or to send the request through a proxy server.

{% hint style="info" %}
The proxy server is owned and developed by Remède (see NO LINK YET)
{% endhint %}
