Hugging Face
Models
Datasets
Spaces
Posts
Docs
Solutions
Pricing
Log In
Sign Up
flax-community
/
gpt2-medium-persian
like
8
Follow
Flax Community
318
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
d19a8a5
gpt2-medium-persian
/
src
/
regexes
/
number.py
m3hrdadfi
Hello gpt2-persian
21d29cb
over 3 years ago
raw
Copy download link
history
blame
Safe
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))"
)