landing / persian.html
masoudmarandi's picture
use https://fonts.google.com/specimen/Vazirmatn for persian.html
9f8a129 verified
<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>هوش مصنوعی فارسی - راهنمای جامع</title>
<!-- Google Fonts - Vazirmatn -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet">
<!-- Tailwind -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- Custom Styles -->
<link rel="stylesheet" href="style.css">
<style>
body {
font-family: 'Vazirmatn', sans-serif;
}
.samim {
font-family: 'Vazirmatn', sans-serif;
}
.tanha {
font-family: 'Vazirmatn', sans-serif;
}
</style>
</head>
<body class="bg-gradient-to-br from-amber-50 to-orange-50 bg-fixed">
<div class="max-w-4xl mx-auto p-8">
<header class="text-center mb-16">
<h1 class="samim text-5xl md:text-6xl font-bold text-amber-800 mb-4">
هوش مصنوعی فارسی
</h1>
<p class="text-xl text-gray-600 leading-relaxed">
راهنمای جامع پیاده‌سازی و توسعه هوش مصنوعی برای زبان فارسی
</p>
</header>
<main class="space-y-12">
<section class="bg-white/80 backdrop-blur-sm rounded-2xl p-8 shadow-lg">
<h2 class="samim text-3xl font-bold text-amber-700 mb-6">مقدمه</h2>
<p class="text-gray-700 leading-loose mb-4">
هوش مصنوعی فارسی به دلیل ساختار خاص زبان فارسی و استفاده از الفبای عربی، چالش‌های منحصربه‌فردی دارد.
از جمله این چالش‌ها می‌توان به نوشتار راست‌به‌چپ، حروف متصل، حذف برخی حروف در کلمات و تنوع در تلفظ اشاره کرد.
</p>
<p class="text-gray-700 leading-loose">
این راهنما به شما کمک می‌کند تا بهترین روش‌ها را برای توسعه سیستم‌های هوش مصنوعی که به‌درستی با زبان فارسی کار می‌کنند، بیاموزید.
</p>
</section>
<section class="bg-white/80 backdrop-blur-sm rounded-2xl p-8 shadow-lg">
<h2 class="samim text-3xl font-bold text-amber-700 mb-6">پیش‌نیازها</h2>
<ul class="space-y-3 text-gray-700">
<li class="flex items-center gap-3">
<span class="w-2 h-2 bg-amber-500 rounded-full"></span>
آشنایی مقدماتی با زبان برنامه‌نویسی پایتون
</li>
<li class="flex items-center gap-3">
<span class="w-2 h-2 bg-amber-500 rounded-full"></span>
دانش پایه درباره پردازش زبان طبیعی (NLP)
</li>
<li class="flex items-center gap-3">
<span class="w-2 h-2 bg-amm500 rounded-full"></span>
نصب کتابخانه‌های مورد نیاز: transformers, torch, hazm
</li>
</ul>
</section>
<section class="bg-white/80 backdrop-blur-sm rounded-2xl p-8 shadow-lg">
<h2 class="samim text-3xl font-bold text-amber-700 mb-6">مراحل اجرا</h2>
<div class="space-y-6">
<div class="border-r-4 border-amber-500 pr-4">
<h3 class="tanha text-xl font-semibold text-amber-800 mb-2">۱. پیش‌پردازش متن</h3>
<p class="text-gray-700 leading-relaxed">
متن فارسی را به‌درستی نرمال‌سازی کنید. این شامل حذف علائم نگارشی، تبدیل اعداد فارسی به انگلیسی،
و یکنواخت‌سازی نویسه‌ها است.
</p>
</div>
<div class="border-r-4 border-orange-500 pr-4">
<h3 class="tanha text-xl font-semibold text-orange-800 mb-2">۲. توکن‌سازی</h3>
<p class="text-gray-700 leading-relaxed">
از توکنایزرهای مخصوص زبان فارسی استفاده کنید. توکن‌های Subword برای زبان فارسی به‌خوبی کار می‌کنند
چون می‌توانند ریشه‌های کلمات را شناسایی کنند.
</p>
</div>
<div class="border-r-4 border-red-500 pr-4">
<h3 class="tanha text-xl font-semibold text-red-800 mb-2">۳. آموزش مدل</h3>
<p class="text-gray-700 leading-relaxed">
از معماری‌های Transformer استفاده کنید که برای زبان‌های راست‌به‌چپ بهینه‌سازی شده‌اند.
مدل‌های چندزبانه مانند mBERT یا XLM-R گزینه‌های خوبی هستند.
</p>
</div>
</div>
</section>
<section class="bg-white/80 backdrop-blur-sm rounded-2xl p-8 shadow-lg">
<h2 class="samim text-3xl font-bold text-amber-700 mb-6">کد نمونه</h2>
<div class="bg-gray-900 rounded-lg p-6 text-left">
<pre class="text-green-400 text-sm overflow-x-auto"><code># نصب کتابخانه‌ها
pip install transformers hazm torch
# پیش‌پردازش متن فارسی
from hazm import Normalizer, word_tokenize
from transformers import AutoTokenizer, AutoModel
# نرمال‌سازی متن
normalizer = Normalizer()
text = "سلام دنیا! این یک متن فارسی است."
normalized_text = normalizer.normalize(text)
# توکن‌سازی
tokenizer = AutoTokenizer.from_pretrained("HooshvareLab/bert-base-parsbert-uncased")
tokens = tokenizer(normalized_text, return_tensors="pt")
# استفاده از مدل
model = AutoModel.from_pretrained("HooshvareLab/bert-base-parsbert-uncased")
outputs = model(**tokens)</code></pre>
</div>
</section>
<section class="bg-white/80 backdrop-blur-sm rounded-2xl p-8 shadow-lg">
<h2 class="samim text-3xl font-bold text-amber-700 mb-6">منابع و پیوندهای مفید</h2>
<div class="grid md:grid-cols-2 gap-4">
<a href="https://huggingface.co/models?language=fa&sort=downloads"
class="block p-4 bg-amber-100 rounded-lg hover:bg-amber-200 transition-colors">
<h3 class="font-semibold text-amber-800">مدل‌های فارسی در Hugging Face</h3>
<p class="text-sm text-amber-700 mt-1">مجموعه‌ای از مدل‌های آموزش‌دیده برای زبان فارسی</p>
</a>
<a href="https://github.com/sobhe/moratab"
class="block p-4 bg-orange-100 rounded-lg hover:bg-orange-200 transition-colors">
<h3 class="font-semibold text-orange-800">کتابخانه مراطب</h3>
<p class="text-sm text-orange-700 mt-1">ابزارهایی برای راست‌به‌چپ‌سازی متن</p>
</a>
<a href="https://www.sobhe.ir/hazm/"
class="block p-4 bg-red-100 rounded-lg hover:bg-red-200 transition-colors">
<h3 class="font-semibold text-red-800">کتابخانه هضم</h3>
<p class="text-sm text-red-700 mt-1">پردازش زبان فارسی در پایتون</p>
</a>
<a href="https://t.me/persiannlp"
class="block p-4 bg-pink-100 rounded-lg hover:bg-pink-200 transition-colors">
<h3 class="font-semibold text-pink-800">کانال تلگرام Persian NLP</h3>
<p class="text-sm text-pink-700 mt-1">اخبار و منابع پردازش زبان فارسی</p>
</a>
</div>
</section>
<section class="bg-gradient-to-r from-amber-600 to-orange-600 rounded-2xl p-8 text-white text-center">
<h2 class="samim text-3xl font-bold mb-4">آماده شروع هستید؟</h2>
<p class="text-lg mb-6 opacity-90">
با استفاده از این منابع، می‌توانید امروز شروع به توسعه سیستم‌های هوش مصنوعی فارسی کنید
</p>
<button onclick="window.open('https://huggingface.co/PersianAICommunity', '_blank')"
class="bg-white text-amber-600 px-8 py-3 rounded-full font-semibold hover:bg-amber-50 transition-colors">
مشاهده پروژه‌های جامعه
</button>
</section>
</main>
<footer class="text-center mt-16 py-8 text-gray-600">
<p class="tanha">ساخته‌شده با ❤️ برای جامعه فارسی‌زبان هوش مصنوعی</p>
</footer>
</div>
<script src="https://unpkg.com/feather-icons"></script>
<script>
feather.replace();
</script>
</body>
</html>