installation.html (100 lines of code) (raw):

--- active_crumb: Docs layout: documentation fa_icon: fa-cog id: installation --- <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <div id="installation" class="col-md-8 second-column"> <section id="maven"> <h2 class="section-title">Maven/Sbt <a href="#"><i class="top-link fas fa-fw fa-angle-double-up"></i></a></h2> <p> The easiest way to start using NLPCraft is to add SBT dependency to your project: </p> <nav> <div class="nav nav-tabs" role="tablist"> <a class="nav-item nav-link active" data-toggle="tab" href="#nav-sbt" role="tab">SBT <img src="/images/scala-logo-h16.png" alt=""></a> <a class="nav-item nav-link" data-toggle="tab" href="#nav-maven" role="tab">Maven <img src="/images/java2-h20.png" alt=""></a> </div> </nav> <div class="tab-content"> <div class="tab-pane fade show active" id="nav-sbt" role="tabpanel"> <pre class="brush: scala"> libraryDependencies += "org.apache.nlpcraft" % "nlpcraft" % "{{site.latest_version}}" </pre> </div> <div class="tab-pane fade" id="nav-maven" role="tabpanel"> <pre class="brush: xml"> &lt;dependency&gt; &lt;groupId&gt;org.apache.nlpcraft&lt;/groupId&gt; &lt;artifactId&gt;nlpcraft&lt;/artifactId&gt; &lt;version&gt;{{site.latest_version}}&lt;/version&gt; &lt;/dependency&gt; </pre> </div> </div> <p> <b>NOTE:</b> <code><b>{{site.latest_version}}</b></code> is the latest version. </p> </section> <section id="install"> <h2 class="section-title">Installation From Source Code<a href="#"><i class="top-link fas fa-fw fa-angle-double-up"></i></a></h2> <p> To built and install NLPCraft from the source code: </p> <ul> <li> If you <a href="/download.html">downloaded</a> binary ZIP archive - <a target="asf" href="https://www.apache.org/dyn/closer.cgi#verify">verify</a> it and unzip it. </li> <li> If you <a href="/download.html">cloned</a> GitHub repository or downloaded source archive compile it via: <ul> <li><code>sbt</code>: <code class="script">$ sbt clean package</code></li> <li><code>maven</code>: <code class="script">$ mvn -B clean package -P stanford-core,examples</code></li> </ul> </li> </ul> <div class="bq warn"> <p> <b>Minimal Java and Scala versions</b> </p> <p> Starting with version <b>1.0.0</b> NLPCraft requires JDK 11+ and Scala 3.2.2.<br/> </p> </div> </section> <section id="new_project"> <h2 class="section-title">Create New Project <a href="#"><i class="top-link fas fa-fw fa-angle-double-up"></i></a></h2> <p> You can create new Scala projects in many ways - we recommend SBT to accomplish this task. Make sure that <code>build.sbt</code> file has the following content: </p> <pre class="brush: js, highlight: [7]"> ThisBuild / version := "0.1.0-SNAPSHOT" ThisBuild / scalaVersion := "3.2.2" lazy val root = (project in file(".")) .settings( name := "Your project", version := "{{site.latest_version}}", libraryDependencies += "org.apache.nlpcraft" % "nlpcraft" % "{{site.latest_version}}", libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.15" % "test" ) </pre> <p> <b>NOTE: </b>make sure to use the latest versions of Scala and ScalaTest. </p> <p> Check out {% doc first-example First Example %} for a quick deep dive. </p> </section> </div> <div class="col-md-2 third-column"> <ul class="side-nav"> <li class="side-nav-title">On This Page</li> <li><a href="#maven">Maven/Sbt</a></li> <li><a href="#install">From Source Code</a></li> <li><a href="#new_project">New Project</a></li> {% include quick-links.html %} </ul> </div>