Hugging Face
Models
Datasets
Spaces
Posts
Docs
Solutions
Pricing
Log In
Sign Up
flax-community
/
gpt2-medium-persian
like
8
Text Generation
Transformers
PyTorch
google-tensorflow
TensorFlow
JAX
TensorBoard
Persian
gpt2
text-generation-inference
Inference Endpoints
Model card
Files
Files and versions
Metrics
Training metrics
Community
29
Train
Deploy
Use this model
refs/pr/14
gpt2-medium-persian
/
src
/
regexes
/
number.py
m3hrdadfi
Hello gpt2-persian
21d29cb
about 3 years ago
raw
Copy download link
history
blame
No virus
172 Bytes
import
re
NUMBERS_REGEX = re.
compile
(
r"(?:^|(?<=[^\w,.]))[+–-]?(([1-9]\d{0,2}(,\d{3})+(\.\d*)?)|([1-9]\d{0,2}([ .]\d{3})+(,\d*)?)|(\d*?[.,]\d+)|\d+)(?:$|(?=\b))"
)