CoolFace
Modelpublic

IALatin/Ciceronianity-classifier

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
Model Card

Ciceronianity classifier

Model and vocab for the Ciceronianity classifier available on https://latin-ia.hepl.ch/classifier

Prepare the classifier

  1. 1.Install tensorflowjs
  2. 2.Embedding layer: load the Universal Sentence Encoder Lite. Model url: https://tfhub.dev/tensorflow/tfjs-model/universal-sentence-encoder-lite/1/default/1, vocab url: model/vocab.json
  3. 3.Multilayer perceptron: load the model from model/model.json

Run the classifier

The model takes a Latin string as an input.

  1. 1.Parse the string with the script provided in parser.js
  2. 2.Use the embedder (cf. 2) to encode the parsed string into an array
  3. 3.Split the array into chunks of 16 items each (array.length = 16)
  4. 4.Feed each array to the multilayer perceptron (cf. 3).
  5. 5.The output will be an array of length 2. Apply the softmax function to this output. The first element of the softmaxed array will be the Ciceronianity score.

license: mit ---