IALatin/Ciceronianity-classifier
0
Ciceronianity classifier
Model and vocab for the Ciceronianity classifier available on https://latin-ia.hepl.ch/classifier
Prepare the classifier
- Install tensorflowjs
- 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
- Multilayer perceptron: load the model from model/model.json
Run the classifier
The model takes a Latin string as an input.
- Parse the string with the script provided in parser.js
- Use the embedder (cf. 2) to encode the parsed string into an array
- Split the array into chunks of 16 items each (array.length = 16)
- Feed each array to the multilayer perceptron (cf. 3).
- 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 ---
