Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,192 +1,193 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
[](https://huggingface.co/arabovs-ai-lab/Tatar2Vec)
|
| 20 |
+
[](LICENSE)
|
| 21 |
+
[](https://streamlit.io)
|
| 22 |
+
|
| 23 |
+
</div>
|
| 24 |
+
|
| 25 |
+
## ๐ Overview
|
| 26 |
+
|
| 27 |
+
Tatar2Vec represents a breakthrough in natural language processing for the Tatar language, offering state-of-the-art word embeddings that significantly outperform existing solutions. This interactive demo allows you to explore the semantic richness of Tatar through cutting-edge AI models.
|
| 28 |
+
|
| 29 |
+
## ๐ Features
|
| 30 |
+
|
| 31 |
+
### ๐ Semantic Search
|
| 32 |
+
- **Word Similarity**: Find semantically similar words
|
| 33 |
+
- **Vector Operations**: Perform complex word analogies
|
| 34 |
+
- **Interactive Visualizations**: Explore results with beautiful charts and word clouds
|
| 35 |
+
|
| 36 |
+
### ๐ง Advanced Analytics
|
| 37 |
+
- **Model Comparison**: Compare FastText vs Word2Vec performance
|
| 38 |
+
- **OOV Handling**: Test out-of-vocabulary word capabilities
|
| 39 |
+
- **Performance Metrics**: Detailed model evaluation scores
|
| 40 |
+
|
| 41 |
+
### ๐ฏ Model Variants
|
| 42 |
+
- **๐ฅ Best FastText**: `ft_dim100_win5_min5_ngram3-6_sg.epoch1` (Composite: 0.7019)
|
| 43 |
+
- **๐ฅ Alternative FastText**: `ft_dim100_win5_min5_ngram3-6_sg.epoch3`
|
| 44 |
+
- **๐ฅ Best Word2Vec**: `w2v_dim200_win5_min5_sg.epoch4`
|
| 45 |
+
- **๐ฅ Compact Word2Vec**: `w2v_dim100_win5_min5_sg`
|
| 46 |
+
|
| 47 |
+
## ๐ Performance Highlights
|
| 48 |
+
|
| 49 |
+
| Model | Composite Score | Semantic Similarity | OOV Handling |
|
| 50 |
+
|-------|----------------|-------------------|-------------|
|
| 51 |
+
| **Best FastText** | 0.7019 | 0.7368 | 1.0000 |
|
| 52 |
+
| Meta cc.tt.300 | 0.2000 | - | - |
|
| 53 |
+
| **Improvement** | **3.5ร** | **Significant** | **Perfect** |
|
| 54 |
+
|
| 55 |
+
## ๐ฎ Quick Start
|
| 56 |
+
|
| 57 |
+
### Try These Examples:
|
| 58 |
+
|
| 59 |
+
#### Word Similarity
|
| 60 |
+
```python
|
| 61 |
+
# Find words similar to "ะผำะบัำะฟ" (school)
|
| 62 |
+
similar_words = model.most_similar('ะผำะบัำะฟ', topn=10)
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
#### Word Analogies
|
| 66 |
+
```python
|
| 67 |
+
# Doctor - man + woman = ?
|
| 68 |
+
analogy = model.most_similar(
|
| 69 |
+
positive=['ัะฐะฑะธะฑ', 'ั
ะฐััะฝ'], # doctor, woman
|
| 70 |
+
negative=['ะธั'] # man
|
| 71 |
+
)
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
#### OOV Testing (FastText Only)
|
| 75 |
+
```python
|
| 76 |
+
# Handle unknown words
|
| 77 |
+
vector = model['ัะตั
ะฝะพะปะพะณะธัะปำััะตัาฏ'] # technology-related word
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
## ๐๏ธ Technical Details
|
| 81 |
+
|
| 82 |
+
### Training Corpus
|
| 83 |
+
- **Total Tokens**: 203.2 million
|
| 84 |
+
- **Vocabulary Size**: 637.7K words
|
| 85 |
+
- **Unique Words**: 1.8 million
|
| 86 |
+
- **Domains**: Wikipedia, news, books, social media
|
| 87 |
+
|
| 88 |
+
### Model Architecture
|
| 89 |
+
- **FastText**: Subword information support
|
| 90 |
+
- **Word2Vec**: Classical word embeddings
|
| 91 |
+
- **Optimized**: Skip-gram architecture, 100 dimensions
|
| 92 |
+
|
| 93 |
+
## ๐ Use Cases
|
| 94 |
+
|
| 95 |
+
### ๐ Education
|
| 96 |
+
- Language learning applications
|
| 97 |
+
- Educational content analysis
|
| 98 |
+
- Academic research
|
| 99 |
+
|
| 100 |
+
### ๐ผ Business
|
| 101 |
+
- Content recommendation systems
|
| 102 |
+
- Search engine enhancement
|
| 103 |
+
- Customer feedback analysis
|
| 104 |
+
|
| 105 |
+
### ๐ฌ Research
|
| 106 |
+
- Linguistic studies
|
| 107 |
+
- Cross-lingual comparisons
|
| 108 |
+
- AI model development
|
| 109 |
+
|
| 110 |
+
## ๐ ๏ธ Installation
|
| 111 |
+
|
| 112 |
+
### Local Development
|
| 113 |
+
```bash
|
| 114 |
+
git clone https://huggingface.co/spaces/arabovs-ai-lab/tatar2vec-demo
|
| 115 |
+
cd tatar2vec-demo
|
| 116 |
+
pip install -r requirements.txt
|
| 117 |
+
streamlit run app.py
|
| 118 |
+
```
|
| 119 |
+
|
| 120 |
+
### Docker Deployment
|
| 121 |
+
```bash
|
| 122 |
+
docker build -t tatar2vec-demo .
|
| 123 |
+
docker run -p 7860:7860 tatar2vec-demo
|
| 124 |
+
```
|
| 125 |
+
|
| 126 |
+
## ๐ API Access
|
| 127 |
+
|
| 128 |
+
```python
|
| 129 |
+
from huggingface_hub import snapshot_download
|
| 130 |
+
from gensim.models import FastText
|
| 131 |
+
|
| 132 |
+
# Download and load the best model
|
| 133 |
+
model_dir = snapshot_download(repo_id="arabovs-ai-lab/Tatar2Vec")
|
| 134 |
+
model = FastText.load(f"{model_dir}/fasttext/ft_dim100_win5_min5_ngram3-6_sg.epoch1/ft_dim100_win5_min5_ngram3-6_sg.epoch1.model")
|
| 135 |
+
|
| 136 |
+
# Use the model
|
| 137 |
+
similar_words = model.wv.most_similar('ะผำะบัำะฟ')
|
| 138 |
+
```
|
| 139 |
+
|
| 140 |
+
## ๐ Evaluation Metrics
|
| 141 |
+
|
| 142 |
+
Our models were evaluated on multiple dimensions:
|
| 143 |
+
- **Semantic Similarity**: Human-judged word pairs
|
| 144 |
+
- **Analogy Accuracy**: Word relationship tasks
|
| 145 |
+
- **OOV Handling**: Unknown word processing
|
| 146 |
+
- **Neighbor Coherence**: Semantic consistency
|
| 147 |
+
|
| 148 |
+
## ๐ค Contributing
|
| 149 |
+
|
| 150 |
+
We welcome contributions from the community! Areas of interest:
|
| 151 |
+
- Additional evaluation benchmarks
|
| 152 |
+
- New model architectures
|
| 153 |
+
- Expanded training data
|
| 154 |
+
- Multilingual applications
|
| 155 |
+
|
| 156 |
+
## ๐ Citation
|
| 157 |
+
|
| 158 |
+
If you use Tatar2Vec in your research, please cite:
|
| 159 |
+
|
| 160 |
+
```bibtex
|
| 161 |
+
@misc{tatar2vec2025,
|
| 162 |
+
title = {Tatar2Vec: High-Quality Tatar Word Embeddings},
|
| 163 |
+
author = {Arabovs AI Lab},
|
| 164 |
+
year = {2025},
|
| 165 |
+
publisher = {Hugging Face},
|
| 166 |
+
url = {https://huggingface.co/arabovs-ai-lab/Tatar2Vec},
|
| 167 |
+
note = {Version 1.0}
|
| 168 |
+
}
|
| 169 |
+
```
|
| 170 |
+
|
| 171 |
+
## ๐ License
|
| 172 |
+
|
| 173 |
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
| 174 |
+
|
| 175 |
+
## ๐ Acknowledgments
|
| 176 |
+
|
| 177 |
+
- Tatar language speakers and contributors
|
| 178 |
+
- Hugging Face for platform support
|
| 179 |
+
- Open-source community for tools and libraries
|
| 180 |
+
|
| 181 |
+
---
|
| 182 |
+
|
| 183 |
+
<div align="center">
|
| 184 |
+
|
| 185 |
+
**Empowering Tatar Language Technology**
|
| 186 |
+
|
| 187 |
+
*Brought to you by [Arabovs AI Lab](https://huggingface.co/arabovs-ai-lab)*
|
| 188 |
+
|
| 189 |
+
[Report Issues](https://github.com/arabovs-ai-lab/tatar2vec/issues) โข
|
| 190 |
+
[Request Features](https://github.com/arabovs-ai-lab/tatar2vec/discussions) โข
|
| 191 |
+
[Contact Team](mailto:contact@arabovs-ai-lab.com)
|
| 192 |
+
|
| 193 |
+
</div>
|