File size: 1,199 Bytes
9d95231 4ef6d7f 237948f 9d95231 79ee1d9 ccffb70 79ee1d9 4e0acb4 faf57d7 4e0acb4 79ee1d9 a5ab72b ccffb70 4c53382 a5ab72b 4c53382 ccffb70 a5ab72b ccffb70 4ef6d7f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
---
pipeline_tag: text2text-generation
widget:
- text: Hellooooo
example_title: Ex 0
- text: believ
example_title: Ex 1
language:
- en
tags:
- spell
- spell correction
- spelling
- spelling correction
- english
- english spelling
---
# Model Card for Model ID
This is a model for word-based spell correction tasks. This model is generated by fine-tuning bart base model.
This model works best for ''WORD-BASED'' spell correction(`not so good with the sequence of words`).
## How to Get Started with the Model
```python
from transformers import AutoTokenizer, TFBartForConditionalGeneration
tokenizer = AutoTokenizer.from_pretrained("veghar/spell_correct_bart_base")
model = TFBartForConditionalGeneration.from_pretrained("veghar/spell_correct_bart_base")
text='believ'
text_tok=tokenizer(text,padding=True, return_tensors='tf')
input_ids = text_tok['input_ids']
outputs = model.generate(input_ids=input_ids, max_length=10,num_return_sequences=3)
corrected_sentences = tokenizer.batch_decode(outputs, skip_special_tokens=True)
print('Misspelled word:', text)
print('Corrected word:', corrected_sentences)
>>Misspelled word: believ
>>Corrected word: ['believe', 'belief', 'believer']
``` |