Instructions to use buyanov-tech/ru_ner_v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- spaCy
How to use buyanov-tech/ru_ner_v2 with spaCy:
!pip install https://huggingface.co/buyanov-tech/ru_ner_v2/resolve/main/ru_ner_v2-any-py3-none-any.whl # Using spacy.load(). import spacy nlp = spacy.load("ru_ner_v2") # Importing as module. import ru_ner_v2 nlp = ru_ner_v2.load() - Notebooks
- Google Colab
- Kaggle
|
Download README.md from buyanov-tech/ru_ner_v2: direct link, hf CLI and curl.
- Browser
- Download file 2.97 kB
-
https://huggingface.co/buyanov-tech/ru_ner_v2/resolve/main/README.md
- Command line
-
hf download hf://buyanov-tech/ru_ner_v2/README.md
-
curl -L -o README.md https://huggingface.co/buyanov-tech/ru_ner_v2/resolve/main/README.md
2.97 kB
| language: ru | |
| library_name: spacy | |
| pipeline_tag: token-classification | |
| tags: | |
| - spacy | |
| - ner | |
| - token-classification | |
| - product-classifier | |
| - russian | |
| license: other | |
| metrics: | |
| - precision | |
| - recall | |
| - f1 | |
| # Product Classifier NER v2 | |
| spaCy NER pipeline for extracting structured product attributes from Russian | |
| product titles and catalog nomenclature. | |
| ## Model Details | |
| - Language: `ru` | |
| - Framework: spaCy | |
| - Pipeline: `tok2vec`, `ner` | |
| - Model path in source project: `models/ner-v2/model-best` | |
| - spaCy compatibility: `>=3.8.14,<3.9.0` | |
| ## Entity Labels | |
| The model predicts the following entity labels: | |
| | Label | Description | | |
| | --- | --- | | |
| | `BRAND` | Brand, manufacturer, or vendor-like name. | | |
| | `COLOR` | Product color. | | |
| | `DENSITY` | Density value or density class. | | |
| | `DIAMETER` | Diameter value. | | |
| | `LENGTH` | Length value. | | |
| | `MODEL` | Model, article-like model name, or product series. | | |
| | `POWER` | Power rating. | | |
| | `PRODUCT_TYPE` | Main product type or product noun phrase. | | |
| | `PROTECTION_RATING` | Protection rating such as IP class. | | |
| | `QUANTITY` | Count, pack quantity, or quantity-like value. | | |
| | `SIZE` | Size, dimension, or size class. | | |
| | `STANDARD` | Standard, specification, or normative class. | | |
| | `VOLUME` | Volume value. | | |
| | `WEIGHT` | Weight value. | | |
| ## Evaluation | |
| Metrics are copied from the trained spaCy `meta.json`: | |
| | Metric | Value | | |
| | --- | ---: | | |
| | Entity F1 | `0.8055687391` | | |
| | Entity precision | `0.8131587352` | | |
| | Entity recall | `0.7981191223` | | |
| ## Usage | |
| Install the model package from Hugging Face after upload, then load it with | |
| spaCy: | |
| ```bash | |
| pip install https://huggingface.co/buyanov-tech/ru_ner_v2/resolve/main/ru_ner_v2-any-py3-none-any.whl | |
| ``` | |
| ```python | |
| import spacy | |
| nlp = spacy.load("ru_ner_v2") | |
| doc = nlp("Труба ПВХ D110 2м серая") | |
| for ent in doc.ents: | |
| print(ent.text, ent.label_) | |
| ``` | |
| Example output from the local `model-best` checkpoint: | |
| ```text | |
| Труба PRODUCT_TYPE | |
| ПВХ SIZE | |
| 2м LENGTH | |
| серая COLOR | |
| ``` | |
| You can also load the unpacked spaCy pipeline from a local directory: | |
| ```python | |
| import spacy | |
| nlp = spacy.load("models/ner-v2/model-best") | |
| doc = nlp("Фильтр воздушный касетный ФВКас-1-590х590х45 G4") | |
| print([(ent.text, ent.label_) for ent in doc.ents]) | |
| ``` | |
| Example output: | |
| ```text | |
| [('Фильтр воздушный касетный', 'PRODUCT_TYPE'), ('ФВКас-1-590х590х45', 'MODEL'), ('G4', 'BRAND')] | |
| ``` | |
| ## Intended Use | |
| This model is intended for internal product catalog processing, product title | |
| normalization, feature extraction, and downstream category classification. | |
| ## Limitations | |
| - The model is trained for Russian product/catalog titles. | |
| - It is optimized for product attribute extraction, not general-purpose NER. | |
| - Label meanings are domain-specific and may differ from generic NLP entity | |
| taxonomies. | |
| - Predictions should be validated before use in high-impact catalog updates or | |
| automated data enrichment pipelines. | |