Estonian XlmRoBertaForQuestionAnswering (from anukaver)

Description

Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. xlm-roberta-est-qa is a Estonian model originally trained by anukaver.

Download Copy S3 URICopied!

How to use

document_assembler = MultiDocumentAssembler() \
.setInputCols(["question", "context"]) \
.setOutputCols(["document_question", "document_context"])

spanClassifier = XlmRoBertaForQuestionAnswering.pretrained("xlm_roberta_qa_xlm_roberta_est_qa","et") \
.setInputCols(["document_question", "document_context"]) \
.setOutputCol("answer") \
.setCaseSensitive(True)

pipeline = Pipeline().setStages([
document_assembler,
spanClassifier
])

example = spark.createDataFrame([["What's my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context")

result = pipeline.fit(example).transform(example)

Model Information

Model Name: xlm_roberta_qa_xlm_roberta_est_qa
Compatibility: Spark NLP 4.0.0+
License: Open Source
Edition: Official
Input Labels: [question, context]
Output Labels: [answer]
Language: et
Size: 883.0 MB
Case sensitive: true
Max sentence length: 512

References

  • https://huggingface.co/anukaver/xlm-roberta-est-qa