Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 28 additions & 15 deletions src/content/docs/Usage_with_Secryst.adoc
Original file line number Diff line number Diff line change
@@ -1,36 +1,48 @@
= Usage with Secryst

Secryst is a seq2seq transformer suited for transliteration. Written in Ruby.
It's installation is a bit tricky, you should consult its own installation guide
(https://github.com/secryst/secryst[at GitHub]). By default we don't use Secryst,
unless you have installed it.
Secryst is the Ruby runtime for Interscript's neural models:

== Using it standalone
[source,ruby]
----
gem install secryst
----

It's enough to install it. Be sure to consult the guide above.
For details, see the https://github.com/secryst/secryst[repository].

== Integration with Ruby Applications
== Using it standalone

In your Gemfile, add:
After installing, load any published model by id:

[source,ruby]
----
source "https://rubygems.org"
require "secryst"

gem "secryst"
model = Secryst::Model.load("ara-diac-small-2.1-int8")
model.translate("قوله فحكمها في الوفاة")
----

Create a Secrystfile near your Gemfile with the following, for each model you
want to use in your application. Please consult our Secrystfile to get all the
maps needed to get all the Secryst maps needed.
The model is downloaded once, verified against its checksum, and cached
under `~/.cache/secryst`. The list of published models is in
https://github.com/interscript/interscript-ml/blob/main/models.yaml[models.yaml].

== Integration with Ruby applications

Add the gem to your Gemfile:

[source,ruby]
----
model "model-name"
source "https://rubygems.org"

gem "secryst"
----

Load models where they are needed. `Model.load` resolves, verifies, and
caches on first use; there is no separate configuration file.

== Usage inside maps

A transliteration map can run a neural model as a step:

[source,ruby]
----
stage {
Expand All @@ -40,4 +52,5 @@ stage {
}
----

As of now, Secryst is usable only by the Ruby implementation.
A map that declares a `secryst` step requires the gem; maps without
neural steps work unchanged.
4 changes: 2 additions & 2 deletions src/pages/about.astro
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ const partners: Partner[] = [
</li>
<li>
<strong>Crystals</strong> — <a href="https://www.secryst.org">secryst</a> (<code
>gem secryst</code
> · <code>pip install secryst</code> · <code>npm i secryst</code>) — local ONNX
>gem install secryst</code
> · <code>pip install interscript-ml</code> · <code>npm install interscript</code>) — local ONNX
inference implementing the contract. A crystal has no interscript dependency; an engine
without a crystal simply cannot execute maps that declare a vocalization step.
</li>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/docs/phonological-layer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import Base from "../../layouts/Base.astro"
<li><strong>interscript engines</strong> stay pure. A map that needs
vocalization declares a <code>secryst</code> (or future <code>vocalize</code>) step; without a crystal installed, that map
simply cannot run that step.</li>
<li><strong>secryst crystals</strong> (<code>gem secryst</code> · <code>pip install secryst</code> · <code>npm i secryst</code> resolve a model id through <code>models.yaml</code>, download a sha256-verified IMF&nbsp;v1 zip,
<li><strong>secryst crystals</strong> (<code>gem install secryst</code> · <code>pip install interscript-ml</code> · <code>npm install interscript</code> resolve a model id through <code>models.yaml</code>, download a sha256-verified IMF&nbsp;v1 zip,
cache it under <code>~/.cache/secryst</code>, and run greedy ONNX
inference locally. No cloud, no telemetry.</li>
<li><strong>interscript-ml</strong> is the contract only: the index,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ml.astro
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ const clientModels = [
gem install secryst

# Python
pip install secryst
pip install interscript-ml

# TypeScript / JavaScript
npm install secryst</code></pre>
Expand Down