|
1 | 1 | """A Sparv plugin for classifying text using the Superlim baseline models.""" |
| 2 | + |
2 | 3 | from sparv.api import Config |
3 | | -from .annotators import ( |
4 | | - absabank_imm, |
5 | | - argumentation_sent, |
6 | | - dalaj_ged, |
7 | | - swenli |
8 | | - ) |
| 4 | + |
9 | 5 | from . import exporters |
| 6 | +from .annotators import absabank_imm, argumentation_sent, dalaj_ged, swenli |
| 7 | + |
| 8 | +__all__ = ["absabank_imm", "argumentation_sent", "dalaj_ged", "swenli", "exporters"] |
10 | 9 |
|
11 | 10 | __config__ = [ |
12 | 11 | # TODO: Split this variable into many different variables according to superlim task |
13 | 12 | # TODO: Make it configurable from config.yaml in corpus directory |
14 | | - Config("sbx_superlim.hf_model_path.argumentation", "sbx/bert-base-swedish-cased_argumentation_sent", description="HuggingFace model fine-tuned on argumentation_sent"), |
15 | | - Config("sbx_superlim.hf_model_path.absabank-imm", "sbx/bert-base-swedish-cased_absabank-imm", description="HuggingFace model fine-tuned on absabank-imm"), |
16 | | - Config("sbx_superlim.hf_model_path.dalaj-ged", "sbx/bert-base-swedish-cased_dalaj-ged", description="HuggingFace model fine-tuned on dalaj-ged"), |
17 | | - Config("sbx_superlim.hf_model_path.swenli", "sbx/bert-base-swedish-cased_swenli", description="HuggingFace model fine-tuned on swenli"), |
18 | | - Config("sbx_superlim.hf_model_path.swepar", "sbx/bert-base-swedish-cased_swepar", description="HuggingFace model fine-tuned on swepar"), |
19 | | - Config("sbx_superlim.hf_inference_args.batch_size", None, description="Batch size for inference. Required with large files and limited CPU/GPU memory."), |
20 | | - Config("sbx_superlim.predictions.contains_words", [], description="Batch size for inference. Required with large files and limited CPU/GPU memory."), |
21 | | - Config("sbx_superlim.predictions.source_files_spans", {}, description="Spans of the source files to analyze.") |
| 13 | + Config( |
| 14 | + "sbx_superlim.hf_model_path.argumentation", |
| 15 | + "sbx/bert-base-swedish-cased_argumentation_sent", |
| 16 | + description="HuggingFace model fine-tuned on argumentation_sent", |
| 17 | + ), |
| 18 | + Config( |
| 19 | + "sbx_superlim.hf_model_path.absabank-imm", |
| 20 | + "sbx/bert-base-swedish-cased_absabank-imm", |
| 21 | + description="HuggingFace model fine-tuned on absabank-imm", |
| 22 | + ), |
| 23 | + Config( |
| 24 | + "sbx_superlim.hf_model_path.dalaj-ged", |
| 25 | + "sbx/bert-base-swedish-cased_dalaj-ged", |
| 26 | + description="HuggingFace model fine-tuned on dalaj-ged", |
| 27 | + ), |
| 28 | + Config( |
| 29 | + "sbx_superlim.hf_model_path.swenli", |
| 30 | + "sbx/bert-base-swedish-cased_swenli", |
| 31 | + description="HuggingFace model fine-tuned on swenli", |
| 32 | + ), |
| 33 | + Config( |
| 34 | + "sbx_superlim.hf_model_path.swepar", |
| 35 | + "sbx/bert-base-swedish-cased_swepar", |
| 36 | + description="HuggingFace model fine-tuned on swepar", |
| 37 | + ), |
| 38 | + Config( |
| 39 | + "sbx_superlim.hf_inference_args.batch_size", |
| 40 | + None, |
| 41 | + description="Batch size for inference. Required with large files and limited CPU/GPU memory.", |
| 42 | + ), |
| 43 | + Config( |
| 44 | + "sbx_superlim.predictions.contains_words", |
| 45 | + [], |
| 46 | + description="Batch size for inference. Required with large files and limited CPU/GPU memory.", |
| 47 | + ), |
| 48 | + Config( |
| 49 | + "sbx_superlim.predictions.source_files_spans", |
| 50 | + {}, |
| 51 | + description="Spans of the source files to analyze.", |
| 52 | + ), |
22 | 53 | ] |
23 | 54 |
|
24 | | -__description__ = "A Sparv plugin for classifying text using the Superlim baseline models." |
| 55 | +__description__ = ( |
| 56 | + "A Sparv plugin for classifying text using the Superlim baseline models." |
| 57 | +) |
0 commit comments