Stopwords Remover for Catalan language (280 entries)

Description

This is a scalable, production-ready Stopwords Remover model trained using the corpus available at stopwords-iso.

Download Copy S3 URI

How to use

documentAssembler = DocumentAssembler() \
.setInputCol("text") \
.setOutputCol("document")

tokenizer = Tokenizer() \
.setInputCols(["document"]) \
.setOutputCol("token")

stop_words = StopWordsCleaner.pretrained("stopwords_iso","ca") \
.setInputCols(["token"]) \
.setOutputCol("cleanTokens")

pipeline = Pipeline(stages=[documentAssembler, tokenizer, stop_words]) 

example = spark.createDataFrame([["No ets millor que jo"]], ["text"]) 

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

Results

+--------+
|result  |
+--------+
|[millor]|
+--------+

Model Information

Model Name: stopwords_iso
Compatibility: Spark NLP 3.4.1+
License: Open Source
Edition: Official
Input Labels: [token]
Output Labels: [cleanTokens]
Language: ca
Size: 2.1 KB