{"componentChunkName":"component---node-modules-carrotsearch-gatsby-theme-apidocs-templates-documentation-page-js","path":"/release-notes-2.0.x-migration-guide/","result":{"data":{"html":{"frontmatter":{"id":"release-notes-2.0.x-migration-guide","title":"2.x migration guide"},"html":"<article>\n  <h1>2.x migration guide</h1>\n\n  <p id=\"611b2a9a\">\n    Version 2.0.0 modernizes the whole Lingo3G ecosystem, including end-user\n    applications and the programming APIs. This article discusses the rationale\n    behind the changes and provides migration procedures for the affected\n    elements of Lingo3G.\n  </p>\n\n  <section id=\"changes\">\n    <h2>\n        <a class=\"anchor\" href=\"#changes\" aria-hidden=\"true\"><svg aria-hidden=\"true\" height=\"16\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"/></svg></a>Overview of changes\n      </h2>\n\n    <p id=\"changes:7adb15d5\">\n      Lingo3G 2.0.0 comes with the first major API refactoring in several years.\n      At first, we tried to avoid incompatible API changes to eliminate the need\n      for manual code updates and data format conversions. Eventually, it became\n      obvious that the accumulated technical debt and technological progress\n      made sustaining the old architecture impractical and it was time to change\n      it.\n    </p>\n\n    <p id=\"changes:a88e037c\">\n      The primary motivation for changes was to simplify the programming\n      interfaces to make your Lingo3G integration code cleaner and easier to\n      maintain. We also wanted to modernize the underlying technology stack, so\n      that Lingo3G's technical debt would not carry over to your systems.\n    </p>\n\n    <p id=\"changes:b013aad5\">The following list summarizes the changes and their driving factors.</p>\n\n    <ul>\n      <li id=\"changes:modernized-rest-api\">\n        <p id=\"changes:modernized-rest-api:5520b91a\"><strong>Modernized REST API</strong></p>\n\n        <p id=\"changes:modernized-rest-api:5c7782a6\">\n          <a href=\"/rest-api-basics/\">Lingo3G 2.x REST API</a> replaces XML\n          with JSON data format for\n          <a href=\"/rest-api-basics/#/cluster\">documents</a>,\n          <a href=\"/lingo3g-parameters/\">parameters</a> and\n          <a href=\"/rest-api-dictionaries/#per-request-dictionaries\">dictionaries</a>\n          to make integration with your JavaScript code a breeze.\n        </p>\n      </li>\n\n      <li id=\"changes:browser-based-workbench\">\n        <p id=\"changes:browser-based-workbench:929f60a3\"><strong>Browser-based Workbench</strong></p>\n\n        <p id=\"changes:browser-based-workbench:3cc1e239\">\n          Lingo3G 2.x removes the Workbench desktop application. The underlying\n          technology has become obsolete and made it hard for us to add new\n          Workbench features.\n        </p>\n\n        <p id=\"changes:browser-based-workbench:f3fd02fa\">\n          The new <a href=\"/clustering-workbench-app/\">Workbench</a> is a\n          browser-based app you can\n          <a href=\"https://search.carrotsearch.com/#/workbench\">try on-line</a>\n          or\n          <a href=\"/clustering-workbench-app/#installation-and-running\">install</a>\n          on your machine. Lingo3G Workbench has new features the old version\n          did not have, such as\n          <a href=\"/trying-lingo3g/#excel-open-office-or-csv-spreadsheet\">clustering data from Excel spreadsheets</a>.\n        </p>\n      </li>\n\n      <li id=\"changes:simpler-java-api-focused-on-clustering\">\n        <p id=\"changes:simpler-java-api-focused-on-clustering:8f6e6eb2\"><strong>Simpler Java API focused on clustering</strong></p>\n\n        <p id=\"changes:simpler-java-api-focused-on-clustering:7fcc3e96\">\n          Lingo3G 1.x Java API exposed the complete pipeline of document sources\n          and clustering algorithm components, along with controllers that\n          managed the data flow. This helped to cluster data from predefined\n          document sources, but at the same time required learning lot of\n          interfaces, methods and classes to make a simple clustering call.\n        </p>\n\n        <p id=\"changes:simpler-java-api-focused-on-clustering:724705d6\">\n          <a href=\"/java-api-basics/\">Lingo3G 2.x Java API</a>\n          removes document sources and data flow controllers entirely. To\n          <a href=\"/java-api-basics/#basic-clustering\">perform clustering</a>, you just need to instantiate the clustering algorithm class,\n          provide it with language resources and a stream of documents to\n          cluster.\n        </p>\n\n        <p id=\"changes:simpler-java-api-focused-on-clustering:68787f11\">\n          If your application requires caching of clustering results or needs to\n          perform clustering in concurrent threads, Lingo3G 2.x Java API does\n          not get in the way – you can choose and implement the caching,\n          reuse and <a href=\"/java-concurrency/\">concurrency pattern</a> that\n          best suits your code.\n        </p>\n      </li>\n\n      <li id=\"changes:employing-compiler-and-ide\">\n        <p id=\"changes:employing-compiler-and-ide:6886f7ee\"><strong>Harnessing the power of the compiler and IDE</strong></p>\n\n        <p id=\"changes:employing-compiler-and-ide:1d03a75f\">\n          The 2.x Java API exposes\n          <a href=\"/java-api-basics/#changing-parameters\">clustering parameters</a>\n          as public, typed fields. When you write the integration code, the IDE\n          autocomplete will help you to discover the available parameters and\n          their value types. If you provide an invalid parameter value, the 2.x\n          Java API throws an exception right away to aid debugging. Finally, if\n          a new version removes or renames a parameter you used, the code won't\n          compile letting you to detect the problem early.\n        </p>\n      </li>\n\n      <li>\n        <p id=\"changes:a7227967\"><strong>Minimal, up-to-date dependencies and technology</strong></p>\n\n        <p id=\"changes:08bb75cb\">\n          The new API minimizes dependencies on third-party libraries and\n          technologies to lower the exposure to the security vulnerabilities in\n          external components and to make integration easier.\n        </p>\n      </li>\n\n      <li>\n        <p id=\"changes:58d6dac2\"><strong>C# API removed</strong></p>\n\n        <p id=\"changes:15a867c0\">\n          We decided to remove the native C# API in Lingo3G 2.x. The reason for\n          this is that the technology we used to build the C# API has been\n          discontinued for several years and the interest in Lingo3G C# API has\n          been steadily declining.\n        </p>\n      </li>\n\n      <li>\n        <p id=\"changes:296a1aea\"><strong>Multilingual clustering removed</strong></p>\n\n        <p id=\"changes:87c0ba29\">\n          Lingo3G 1.x offered built-in language detection and multilingual\n          clustering. To keep focus on clustering and to limit dependencies, we\n          removed this feature from Lingo3G 2.x – the new API allows\n          clustering documents in a single language. If your application relies\n          on multilingual clustering, see <a href=\"#\">this migration step</a>\n          for possible solutions.\n        </p>\n      </li>\n\n      <li>\n        <p id=\"changes:b1ca2b76\"><strong>Features scheduled for removal</strong></p>\n\n        <p id=\"changes:9a70c343\">\n          The incremental clustering (\"persistent clusters\") feature and\n          clustering based on nominal and numeric fields are scheduled for\n          removal in Lingo3G 2.x released after December, 2021.\n        </p>\n\n        <p id=\"changes:f02dfa5a\">\n          The incremental clustering feature was aimed at scaling Lingo3G\n          clustering beyond several thousands of document. If you use Lingo3G to\n          cluster collections of this size, consider switching to\n          <a href=\"https://carrotsearch.com/lingo4g/\">Lingo4G</a>, which was\n          specifically designed for the large-scale clustering case.\n        </p>\n\n        <p id=\"changes:8d153dc7\">\n          Clustering based on nominal and numeric fields was an experimental\n          feature that never attracted significant attention. For this reason,\n          we decided to schedule it for removal.\n        </p>\n      </li>\n    </ul>\n  </section>\n\n  <section id=\"migration-guide\">\n    <h2>\n        <a class=\"anchor\" href=\"#migration-guide\" aria-hidden=\"true\"><svg aria-hidden=\"true\" height=\"16\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"/></svg></a>Migration guide\n      </h2>\n\n    <section id=\"migration-guide:rest-api\">\n      <h3>\n        <a class=\"anchor\" href=\"#migration-guide:rest-api\" aria-hidden=\"true\"><svg aria-hidden=\"true\" height=\"16\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"/></svg></a>REST API (DCS)\n      </h3>\n\n      <p id=\"migration-guide:rest-api:3c07b041\">\n        Lingo3G 2.x REST API is not backward compatible with the 1.x API –\n        you will need to update your Lingo3G integration code to make it work\n        with version 2.x. This section lists the key elements to look for in\n        your existing code.\n      </p>\n\n      <ol>\n        <li>\n          <p id=\"migration-guide:rest-api:fdc7ef8a\">\n            <strong>First, have a look at the new REST API.</strong>\n          </p>\n\n          <p id=\"migration-guide:rest-api:1bd3b72b\">\n            Before you start converting any existing code, have a look at the\n            <a href=\"/rest-api-basics/\">basics of the new API</a>.\n          </p>\n        </li>\n\n        <li>\n          <p id=\"migration-guide:rest-api:922ec9e3\">\n            <strong>Identify <code>suite-dcs.xml</code> modifications.</strong>\n          </p>\n\n          <p id=\"migration-guide:rest-api:8fff01fa\">\n            Previously, Lingo3G used the <code>suite-dcs.xml</code> component\n            suite definition to declare document sources, algorithms and\n            parameter changes. If you edited that file to change parameters or\n            add custom document sources, identify these changes first.\n          </p>\n\n          <p id=\"migration-guide:rest-api:320d55fd\">\n            The new REST API does not support document sources, so if your code\n            used built-in or custom document sources, you need to modify the\n            code to fetch documents directly from the source and pass them to\n            Lingo3G REST API for clustering.\n          </p>\n\n          <p id=\"migration-guide:rest-api:dcaf97ca\">\n            If you modified <code>suite-dcs.xml</code> to change Lingo3G\n            parameter values, pass the modified parameters directly in the\n            <a href=\"/rest-api-basics/#/cluster\">clustering request</a>\n            or in a\n            <a href=\"/rest-api-request-templates/\">request template</a>.\n          </p>\n        </li>\n\n        <li>\n          <p id=\"migration-guide:rest-api:8ee775f4\"><strong>Switch from XML to JSON.</strong></p>\n\n          <p id=\"migration-guide:rest-api:7f93a38e\">\n            The new REST API accepts and returns\n            <a href=\"/rest-api-basics/#/cluster\">data in JSON format</a>, so\n            you will need to modify your code to use the new format. If you\n            write your client code in Java, you can use\n            <a href=\"/rest-api-basics/#java-models\">data model classes</a>\n            to produce the required JSON structure.\n          </p>\n        </li>\n\n        <li>\n          <p id=\"migration-guide:rest-api:e32fca66\"><strong>Convert dictionaries to JSON.</strong></p>\n\n          <p id=\"migration-guide:rest-api:93b052d8\">\n            If you edited any dictionary files in your existing DCS setup,\n            <a href=\"#migration-guide:java-api:dictionary-conversion\">covert the dictionaries</a>\n            from XML to JSON and copy them to the\n            <a href=\"/dictionaries/#location-of-dictionary-files:document-clustering-server\">DCS dictionary directory</a>.\n          </p>\n        </li>\n      </ol>\n    </section>\n\n    <section id=\"migration-guide:java-api\">\n      <h3>\n        <a class=\"anchor\" href=\"#migration-guide:java-api\" aria-hidden=\"true\"><svg aria-hidden=\"true\" height=\"16\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"/></svg></a>Java API\n      </h3>\n\n      <p id=\"migration-guide:java-api:e89320c3\">\n        Lingo3G 2.x Java API is not backward compatible with the 1.x API –\n        you will need to update your Lingo3G integration code to make it work\n        with version 2.x. This section lists the key elements to look for in\n        your existing code.\n      </p>\n\n      <ol>\n        <li>\n          <p id=\"migration-guide:java-api:b5ffbdfb\">\n            <strong>First, have a look at the new API.</strong>\n          </p>\n\n          <p id=\"migration-guide:java-api:1b74adc4\">\n            Before you start converting any existing code, have a look at the\n            <a href=\"/java-api-basics/#basic-clustering\">basics of the new API</a>, code examples included in the distribution package and\n            <a href=\"../javadoc\">JavaDoc</a>. This will give you an idea of\n            what the updated code should look like.\n          </p>\n        </li>\n\n        <li>\n          <p id=\"migration-guide:java-api:ecf70b17\"><strong>Identify the controller.</strong></p>\n\n          <p id=\"migration-guide:java-api:da3e4346\">\n            Look for references to the <code>Controller</code> class in your\n            existing code. You should see a fragment similar to:\n          </p>\n\n          <div class=\"gatsby-highlight\">\n    <pre class=\"language-java\"><code data-language=\"java\"><span class=\"token class-name\">Controller</span> controller <span class=\"token operator\">=</span> <span class=\"token class-name\">ControllerFactory</span><span class=\"token punctuation\">.</span><span class=\"token function\">createCachingPooling</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">.</span><span class=\"token punctuation\">.</span><span class=\"token punctuation\">.</span><span class=\"token punctuation\">)</span>\n</code></pre>\n  </div>\n\n          <p id=\"migration-guide:java-api:6c913b2f\">\n            Lingo3G 1.x used the controller as a cache and threading\n            coordinator. <code>Controller</code> does not have a direct\n            replacement in the 2.x API, but the place where you initialized it\n            is very likely the right place to\n            <a href=\"/java-api-basics/#basic-clustering:load-reusable-components\">load and initialize the language components</a>. Your code should load language components once and reuse them for\n            all subsequent clustering calls, also in\n            <a href=\"/java-concurrency/\">concurrent threads</a>.\n          </p>\n        </li>\n\n        <li>\n          <p id=\"migration-guide:java-api:bb33ecea\">\n            <strong>Identify document source(s) and the <code>process</code> the\n              method.</strong>\n          </p>\n\n          <p id=\"migration-guide:java-api:5bf8f7d1\">\n            Lingo3G 1.x API collected the input for clustering using classes\n            implementing the <code>IDocumentSource</code> interface. Look for an\n            implementation of this class that is part of the processing chain\n            invoked on the controller, or search for an explicit list of\n            documents set on the parameters passed to the\n            <code>process</code> method. For example:\n          </p>\n\n          <div class=\"gatsby-highlight\">\n    <pre class=\"language-java\"><code data-language=\"java\"><span class=\"token class-name\">CommonAttributesDescriptor</span><span class=\"token punctuation\">.</span><span class=\"token function\">attributeBuilder</span><span class=\"token punctuation\">(</span>processingAttributes<span class=\"token punctuation\">)</span>\n  <span class=\"token punctuation\">.</span><span class=\"token function\">documents</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">.</span><span class=\"token punctuation\">.</span><span class=\"token punctuation\">.</span><span class=\"token punctuation\">)</span>\n<span class=\"token punctuation\">.</span><span class=\"token punctuation\">.</span><span class=\"token punctuation\">.</span>\n<span class=\"token class-name\">ProcessingResult</span> result <span class=\"token operator\">=</span> controller<span class=\"token punctuation\">.</span><span class=\"token function\">process</span><span class=\"token punctuation\">(</span>processingAttributes<span class=\"token punctuation\">,</span>\n  <span class=\"token class-name\">Lingo3GClusteringAlgorithm</span><span class=\"token punctuation\">.</span><span class=\"token keyword\">class</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre>\n  </div>\n\n          <p id=\"migration-guide:java-api:402892e7\">\n            Replace the <code>controller.process(...)</code> call with the 2.x\n            Java API calls:\n            <a href=\"/java-api-basics/#basic-clustering:create-disposable-components\">Lingo3G algorithm instantiation</a>,\n            <a href=\"/java-api-basics/#basic-clustering:prepare-documents\">document stream preparation</a>\n            and\n            <a href=\"/java-api-basics/#basic-clustering:perform-clustering\">clustering call</a>.\n          </p>\n\n          <p id=\"migration-guide:java-api:497d8085\">\n            Note that with the new API, your code needs to provide an explicit\n            stream of documents for clustering. For each document, provide only\n            the fields that Lingo3G should use for clustering.\n          </p>\n        </li>\n\n        <li>\n          <p id=\"migration-guide:java-api:c6d15895\"><strong>Identify parameter customizations.</strong></p>\n\n          <p id=\"migration-guide:java-api:2bfa2e8b\">\n            With the 1.x API, your code could set custom parameter values during\n            controller initialization or at processing-time. Identify any\n            parameters that your code customizes. Their names in the old and new\n            API are identical or very similar.\n          </p>\n\n          <p id=\"migration-guide:java-api:a72fbbc2\">\n            With the 2.x API, your code should\n            <a href=\"/java-api-basics/#changing-parameters\">set parameters</a>\n            as part of Lingo3G algorithm instantiation. To decouple parameter\n            customization from the clustering call, consider\n            <a href=\"/java-concurrency/#cloning\">cloning a \"blueprint\" instance</a>.\n          </p>\n\n          <p id=\"migration-guide:java-api:9dc07f9f\">\n            If your code uses any of the following parameters, you need to make\n            manual adjustments:\n          </p>\n\n          <ul>\n            <li>\n              <p id=\"migration-guide:java-api:fa23f8ea\">\n                <code>reloadResources</code>\n                is not available in the new API. A functional equivalent is\n                <a href=\"/java-api-basics/#basic-clustering:load-reusable-components\">loading a new language components instance</a>\n                explicitly. However, we don't recommend reloading language\n                components in production code due to the computational overhead.\n                To modify dictionaries at runtime, use\n                <a href=\"/java-dictionaries/#ephemeral-dictionaries\">ephemeral dictionaries</a>\n                instead.\n              </p>\n            </li>\n\n            <li>\n              <p id=\"migration-guide:java-api:793fab67\">\n                <code>languageRecognition</code>,\n                <code>minLanguageRecognitionConfidence</code>\n                have been removed from the new API as part of language detection\n                and multilingual clustering removal.\n              </p>\n\n              <p id=\"migration-guide:java-api:7791d412\">\n                To perform multilingual clustering, use an external language\n                detection library, such as\n                <a href=\"https://github.com/pemistahl/lingua\" target=\"_blank\">Lingua</a>, to split documents into separate language and cluster each\n                language separately.\n              </p>\n            </li>\n\n            <li>\n              <p id=\"migration-guide:java-api:3b30bc36\">\n                <code>titleFields</code> is now called\n                <a href=\"/lingo3g-parameters/#documents.boostFields\"><code>boostFields</code></a>\n                and the corresponding\n                <code>titleWordLabelScorerWeight</code> is now called\n                <a href=\"/lingo3g-parameters/#scoring.boostedFieldScorerWeight\"><code>boostedFieldScorerWeight</code></a>.\n              </p>\n\n              <p id=\"migration-guide:java-api:19370f58\">\n                Furthermore, Lingo3G 2.x does not boost the\n                <code>title</code> field by default any more. If you'd like to\n                boost the <code>title</code> field,\n                <a href=\"/java-api-basics/#changing-parameters\">set</a> the\n                <a href=\"/lingo3g-parameters/#documents.boostFields\"><code>boostFields</code></a>\n                parameter to <code>title</code>.\n              </p>\n            </li>\n\n            <li>\n              <p id=\"migration-guide:java-api:9bd4178c\">\n                <code>generateLabelHighlights</code> is removed without\n                replacement. If your application relies heavily on highlighting\n                occurrences of cluster labels in the text, consider switching to\n                <a href=\"https://carrotsearch.com/lingo4g/\">Lingo4G</a>, which\n                offers comprehensive support for label highlighting.\n              </p>\n            </li>\n          </ul>\n        </li>\n\n        <li id=\"resources\">\n          <p id=\"resources:f6eb2514\"><strong>Identify resource location customizations.</strong></p>\n\n          <p id=\"resources:e90ebeca\">\n            If your existing code customizes resource locations, you may see a\n            code fragment like this:\n          </p>\n\n          <div class=\"gatsby-highlight\">\n    <pre class=\"language-java\"><code data-language=\"java\"><span class=\"token class-name\">ResourceLookup</span> resourceLookup <span class=\"token operator\">=</span> <span class=\"token keyword\">new</span> <span class=\"token class-name\">ResourceLookup</span><span class=\"token punctuation\">(</span><span class=\"token keyword\">new</span> <span class=\"token class-name\">DirLocator</span><span class=\"token punctuation\">(</span>resourcesDir<span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token punctuation\">.</span><span class=\"token punctuation\">.</span><span class=\"token punctuation\">.</span>\n<span class=\"token class-name\">LexicalDataLoaderDescriptor</span><span class=\"token punctuation\">.</span><span class=\"token function\">attributeBuilder</span><span class=\"token punctuation\">(</span>controllerInitAttrs<span class=\"token punctuation\">)</span>\n  <span class=\"token punctuation\">.</span><span class=\"token function\">resourceLookup</span><span class=\"token punctuation\">(</span>resourceLookup<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre>\n  </div>\n\n          <p id=\"resources:b77e5406\">\n            In Lingo3G 2.x API, you can\n            <a href=\"/java-dictionaries/#customizing-dictionaries\">customize resource locations\n            </a>\n            when loading language components.\n          </p>\n\n          <p id=\"resources:784c2f6f\">\n            Lingo3G 2.x also changes the dictionary file naming conventions. The\n            following table illustrates the changes for English, other languages\n            follow the same convention.\n          </p>\n\n          <table style=\"width: 100%\" id=\"migration-guide:java-api:dictionary-file-names\">\n            <thead>\n              <tr>\n                <th>Dictionary type</th>\n                <th>Old name</th>\n                <th>New name</th>\n              </tr>\n            </thead>\n\n            <tbody>\n              <tr>\n                <td>Label dictionary</td>\n                <td>label-dictionary.en.xml</td>\n                <td>english.labels.json</td>\n              </tr>\n\n              <tr>\n                <td>Word dictionary</td>\n                <td>word-dictionary.en.xml</td>\n                <td>english.tags.json</td>\n              </tr>\n\n              <tr>\n                <td>Synonyms</td>\n                <td>synonyms.en.xml</td>\n                <td>english.synonyms.json</td>\n              </tr>\n            </tbody>\n          </table>\n\n          <p id=\"resources:2331f20d\">\n            Finally, Lingo3G 2.x switches the format of dictionary files from\n            XML to JSON. You can use a command line tool to\n            <a href=\"#migration-guide:java-api:dictionary-conversion\">convert</a>\n            your custom dictionaries.\n          </p>\n        </li>\n\n        <li id=\"migration-guide:java-api:dictionary-conversion\">\n          <p id=\"migration-guide:java-api:dictionary-conversion:e32fca66\"><strong>Convert dictionaries to JSON.</strong></p>\n\n          <p id=\"migration-guide:java-api:dictionary-conversion:553584d6\">\n            If your existing code loads custom XML dictionary files, you need to\n            <a href=\"#migration-guide:java-api:dictionary-file-names\">rename</a>\n            and convert them to the JSON format. Version 2.x replaces the\n            XML-based\n            <a href=\"https://get.carrotsearch.com/lingo3g/1.16.3/manual/#section.label-matching\">token-matching rules</a>\n            with simpler and more intuitive\n            <a href=\"/dictionaries/#label-matchers:glob\">glob expressions</a>.\n          </p>\n\n          <p id=\"migration-guide:java-api:dictionary-conversion:b70b083d\">\n            Lingo3G 2.x comes with a migration command line tool you can use to\n            covert your custom dictionaries from XML to JSON. The following\n            examples assume you convert English dictionaries, change the input\n            file name if needed.\n          </p>\n\n          <p id=\"migration-guide:java-api:dictionary-conversion:8c0ca449\">To perform the conversion, perform these steps:</p>\n\n          <ol>\n            <li>\n              <p id=\"migration-guide:java-api:dictionary-conversion:b1dad2d5\">\n                Open a command prompt and change current directory to the\n                top-level Lingo3G distribution folder.\n              </p>\n            </li>\n\n            <li>\n              <p id=\"migration-guide:java-api:dictionary-conversion:689d0284\">To convert a label dictionary, run:</p>\n\n              <div class=\"gatsby-highlight\">\n    <pre class=\"language-shell\"><code data-language=\"shell\">java -jar lib<span class=\"token punctuation\">\\</span>lingo3g-migration-2.0.0.jar convert-labels label-dictionary.en.xml</code></pre>\n  </div>\n\n              <p id=\"migration-guide:java-api:dictionary-conversion:46558707\">This command produces <code>english.labels.json</code>.</p>\n            </li>\n\n            <li>\n              <p id=\"migration-guide:java-api:dictionary-conversion:de978961\">To convert a synonym dictionary, run:</p>\n\n              <div class=\"gatsby-highlight\">\n    <pre class=\"language-shell\"><code data-language=\"shell\">java -jar lib<span class=\"token punctuation\">\\</span>lingo3g-migration-2.0.0.jar convert-synonyms synonyms.en.xml</code></pre>\n  </div>\n\n              <p id=\"migration-guide:java-api:dictionary-conversion:a7d26005\">This command produces <code>english.synonyms.json</code>.</p>\n            </li>\n\n            <li>\n              <p id=\"migration-guide:java-api:dictionary-conversion:46963fb3\">To convert a word dictionary to a tag dictionary, run:</p>\n\n              <div class=\"gatsby-highlight\">\n    <pre class=\"language-shell\"><code data-language=\"shell\">java -jar lib<span class=\"token punctuation\">\\</span>lingo3g-migration-2.0.0.jar java -jar convert-words word-dictionary.en.xml</code></pre>\n  </div>\n\n              <p id=\"migration-guide:java-api:dictionary-conversion:f1e674aa\">The command produces <code>english.tags.json</code>.</p>\n            </li>\n          </ol>\n\n          <p id=\"migration-guide:java-api:dictionary-conversion:0d2020f5\">\n            Note that conversion tools \"flatten\" all internal includes present\n            in XML files. If to keep the dictionaries separate, remove include\n            statements before conversion and run the converter on each file\n            separately.\n          </p>\n        </li>\n\n        <li>\n          <p id=\"migration-guide:java-api:7acf1eae\"><strong>Update license file lookup locations.</strong></p>\n\n          <p id=\"migration-guide:java-api:46da4ddf\">\n            Lingo3G 2.x Java API slightly changes the\n            <a href=\"/installation/#license-file:locations:java-api\">license file lookup locations</a>. Most notably, Lingo3G now uses the class loader of Lingo3G API\n            JAR to look up the license resource instead of the thread's context\n            class loader.\n          </p>\n        </li>\n      </ol>\n    </section>\n\n    <section id=\"migration-guide:csharp-api\">\n      <h3>\n        <a class=\"anchor\" href=\"#migration-guide:csharp-api\" aria-hidden=\"true\"><svg aria-hidden=\"true\" height=\"16\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"/></svg></a>C# API\n      </h3>\n\n      <p id=\"migration-guide:csharp-api:326e1cef\">\n        Lingo3G 2.x discontinued the native C# API due to the declining\n        developer interest. If your application relies on the C# API, consider\n        converting your C# code to call\n        <a href=\"/rest-api-basics/\">Lingo3G REST API</a> instead.\n      </p>\n    </section>\n\n    <section id=\"migration-guide:workbench\">\n      <h3>\n        <a class=\"anchor\" href=\"#migration-guide:workbench\" aria-hidden=\"true\"><svg aria-hidden=\"true\" height=\"16\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"/></svg></a>Clustering Workbench\n      </h3>\n\n      <p id=\"migration-guide:workbench:591db2b1\">\n        Lingo3G 2.x discontinued the desktop Clustering Workbench application in\n        favor of the browser-based\n        <a href=\"/clustering-workbench-app/\">Clustering Workbench app</a>.\n      </p>\n\n      <p id=\"migration-guide:workbench:dd8f2bb7\">\n        The following elements of the old desktop-based Workbench are not\n        available in the new browser-based version:\n      </p>\n\n      <dl>\n        <dt>Multiple results panels</dt>\n        <dd>\n          <p id=\"migration-guide:workbench:6e665b64\">\n            The old Workbench could open multiple clustering results tabs for\n            simultaneous viewing. To achieve the same with the new Workbench,\n            use browser tabs to work on multiple clustering results at the same\n            time.\n          </p>\n        </dd>\n\n        <dt>Aduna Cluster Map</dt>\n        <dd>\n          <p id=\"migration-guide:workbench:b08e350a\">\n            The old Workbench had an option to present document clusters as an\n            interactive graph of nodes. This kind of visualization is not\n            currently available in the new Workbench, but we're hoping to add an\n            equivalent counterpart at some point.\n          </p>\n        </dd>\n\n        <dt>Benchmark view</dt>\n        <dd>\n          <p id=\"migration-guide:workbench:4ae720c1\">\n            You could use the old Workbench to run performance benchmarks of\n            Lingo3G clustering. This function is not possible to reliably\n            implement in the new Workbench and is not available. The best way to\n            asses Lingo3G performance is to benchmark it as part of the\n            application you are developing. If you need any performance or\n            benchmarking advice, please contact us at\n            <a href=\"mailto:info@carrotsearch.com\">info@carrotsearch.com</a>.\n          </p>\n        </dd>\n      </dl>\n\n      <p id=\"migration-guide:workbench:54ba7a3d\">\n        The new Workbench comes with features the old version did not have, such\n        as\n        <a href=\"/trying-lingo3g/#excel-open-office-or-csv-spreadsheet\">clustering data from Excel spreadsheets</a>\n        or\n        <a href=\"/clustering-workbench-app/#user-interface:document-view-configuration\">configurable document view</a>.\n      </p>\n    </section>\n  </section>\n</article>","tableOfContents":[{"heading":"Overview of changes","anchor":"changes"},{"heading":"Migration guide","anchor":"migration-guide","sections":[{"heading":"REST API (DCS)","anchor":"migration-guide:rest-api"},{"heading":"Java API","anchor":"migration-guide:java-api"},{"heading":"C# API","anchor":"migration-guide:csharp-api"},{"heading":"Clustering Workbench","anchor":"migration-guide:workbench"}]}]}},"pageContext":{"slug":"/release-notes-2.0.x-migration-guide/"}},"staticQueryHashes":["1164750013"]}