npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

test-nanoai

v0.0.1

Published

<div dir="rtl">

Downloads

4

Readme

🚀 البدء السريع

نظام التعلم التكيفي

const NanoAI = require('nanoai');

// إنشاء نظام تعلم تكيفي
const tutor = new NanoAI.AdaptiveLearning();

// تقييم أداء المتعلم
const assessment = tutor.assessPerformance(8, 10);
console.log('المستوى الحالي:', assessment.currentLevel);
console.log('المواضيع المقترحة:', assessment.recommendedTopics);

// توليد تمرين جديد
const exercise = tutor.generateExercise();
console.log('التمرين:', exercise);

// أمثلة متقدمة
const complexAssessment = tutor.assessPerformance(8, 10, {
    topic: 'machine_learning',
    subtopics: ['neural_networks', 'deep_learning'],
    previousScores: [7, 8, 9],
    timeSpent: 45 // بالدقائق
});

توليد المحتوى التعليمي

const NanoAI = require('nanoai');

// إنشاء مولد محتوى
const generator = new NanoAI.ContentGenerator();

// توليد درس تفاعلي
const lesson = await generator.generateLesson('الذكاء الاصطناعي', {
    language: 'ar',
    difficulty: 'intermediate',
    format: 'markdown',
    includeExercises: true,
    includeDiagrams: true
});

// توليد محتوى متقدم
const advancedContent = await generator.generateLesson('تعلم الآلة', {
    format: 'html',
    styles: {
        theme: 'dark',
        fontSize: '16px',
        codeHighlight: true
    },
    components: {
        interactiveDemo: true,
        codeEditor: true,
        quizzes: true
    }
});

معالجة النصوص

const NanoAI = require('nanoai');

// إنشاء معالج نصوص
const processor = new NanoAI.TextProcessor();

// بناء المفردات
processor.buildVocabulary([
    'تعلم الآلة رائع',
    'الذكاء الاصطناعي يغير التكنولوجيا',
    'التعلم العميق يحدث ثورة'
]);

// تحويل النص إلى متجه
const vector = processor.textToVector('تعلم الآلة');

// مقارنة النصوص
const similarity = processor.cosineSimilarity(
    processor.textToVector('الذكاء الاصطناعي'),
    processor.textToVector('تعلم الآلة')
);

// تحليل متقدم
const analysis = processor.analyzeText('نص طويل للتحليل', {
    extractKeywords: true,
    findPatterns: true,
    sentimentAnalysis: true,
    languageDetection: true
});

الشبكات العصبية

const NanoAI = require('nanoai');

// إنشاء شبكة عصبية
const nn = new NanoAI.Model([2, 8, 4, 1], {
    learningRate: 0.1,
    momentum: 0.9,
    activation: 'sigmoid'
});

// بيانات التدريب
const trainingData = [
    { input: [0, 0], output: [0] },
    { input: [0, 1], output: [1] },
    { input: [1, 0], output: [1] },
    { input: [1, 1], output: [0] }
];

// تدريب متقدم
const trainingConfig = {
    epochs: 1000,
    batchSize: 4,
    validationSplit: 0.2,
    earlyStoppingPatience: 10,
    callbacks: {
        onEpochEnd: (epoch, metrics) => {
            console.log(`Epoch ${epoch}: loss = ${metrics.loss}`);
        }
    }
};

// تدريب النموذج
nn.train(trainingData, trainingConfig);

// التنبؤ
console.log('تنبؤ:', nn.predict([1, 0]));

// حفظ النموذج
const serialized = nn.serialize();
localStorage.setItem('model', serialized);

// تحميل النموذج
const loaded = NanoAI.Model.deserialize(localStorage.getItem('model'));

🛠 متطلبات النظام التفصيلية

المتطلبات الأساسية

  • Node.js: الإصدار 16 أو أحدث
  • npm: الإصدار 7 أو أحدث
  • الذاكرة: 512 ميجابايت كحد أدنى (يوصى بـ 1 جيجابايت)
  • المساحة التخزينية: 100 ميجابايت كحد أدنى

أنظمة التشغيل المدعومة

  • Windows 10/11 (x64)
  • macOS 10.14 أو أحدث
  • Linux (أي توزيعة حديثة)
    • Ubuntu 20.04 أو أحدث
    • Fedora 34 أو أحدث
    • CentOS 8 أو أحدث

متطلبات اختيارية

  • WebGL: لدعم الرسوم البيانية المتقدمة
  • وحدة معالجة الرسومات (GPU): لتسريع عمليات التعلم العميق
  • ذاكرة إضافية: 2 جيجابايت للمشاريع الكبيرة

🔒 الأمان والخصوصية

حماية البيانات

  • جميع العمليات تتم محلياً
  • لا يتم إرسال أي بيانات لخوادم خارجية
  • تشفير البيانات المخزنة
  • دعم للتشفير من طرف إلى طرف

إجراءات الأمان

  • فحص التحديثات تلقائياً
  • تنبيهات عند وجود مشاكل أمنية
  • نظام صلاحيات متقدم
  • سجلات أمنية مفصلة

💻 دليل المساهمين

إعداد بيئة التطوير

# استنساخ المشروع
git clone https://github.com/yourusername/nanoai.git

# تثبيت التبعيات
npm install

# تشغيل الاختبارات
npm test

# تشغيل خادم التطوير
npm run dev

هيكل المشروع

nanoai/
├── src/
│   ├── core/          # المكونات الأساسية
│   ├── models/        # نماذج التعلم الآلي
│   ├── utils/         # أدوات مساعدة
│   └── types/         # تعريفات TypeScript
├── test/             # اختبارات
├── examples/         # أمثلة تطبيقية
└── docs/            # الوثائق

معايير الكود

  • استخدام ESLint مع تكوين موحد
  • تنسيق باستخدام Prettier
  • تغطية اختبارات لا تقل عن 80%
  • توثيق جميع الدوال والفئات
  • استخدام TypeScript للتحقق من الأنواع

خطوات المساهمة

  1. اختر مشكلة للعمل عليها
  2. ناقش الحل في صفحة المشكلة
  3. انشئ فرعاً جديداً
  4. اكتب الكود والاختبارات
  5. قم بتحديث الوثائق
  6. أرسل طلب الدمج

🎯 أمثلة متقدمة

1. التعلم التكيفي المتقدم

const NanoAI = require('nanoai');

// إنشاء نظام تعلم متقدم
const tutor = new NanoAI.AdaptiveLearning({
    initialLevel: 'intermediate',
    adaptationRate: 0.3,
    featuresExtraction: true,
    analytics: {
        trackProgress: true,
        generateReports: true
    }
});

// تكوين متقدم للتقييم
const assessmentConfig = {
    topic: 'machine_learning',
    subtopics: ['neural_networks', 'deep_learning'],
    difficulty: 'adaptive',
    timeLimit: 45,
    questionTypes: ['multiple_choice', 'coding', 'project'],
    scoring: {
        accuracy: 0.7,
        speed: 0.3
    }
};

// تقييم مع تحليل متقدم
const result = await tutor.assessPerformance(8, 10, assessmentConfig);

console.log('تحليل الأداء:', result.analysis);
console.log('التوصيات:', result.recommendations);
console.log('خطة التعلم المقترحة:', result.learningPath);

2. توليد محتوى متقدم

const NanoAI = require('nanoai');

// إنشاء مولد محتوى متقدم
const generator = new NanoAI.ContentGenerator({
    language: 'ar',
    aiModel: 'advanced',
    useCache: true,
    optimization: {
        imageCompression: true,
        codeMinification: true
    }
});

// توليد درس تفاعلي متقدم
const lesson = await generator.generateLesson('الذكاء الاصطناعي', {
    format: 'interactive',
    components: {
        codeEditor: {
            language: 'python',
            autoComplete: true,
            linting: true
        },
        visualization: {
            type: '3d',
            interactive: true
        },
        assessment: {
            adaptive: true,
            immediate_feedback: true
        }
    },
    media: {
        videos: true,
        animations: true,
        diagrams: true
    },
    accessibility: {
        screenReader: true,
        highContrast: true
    }
});

// تصدير بتنسيقات متعددة
await generator.export(lesson, ['html', 'pdf', 'epub']);

3. معالجة نصوص متقدمة

const NanoAI = require('nanoai');

// إعداد معالج نصوص متقدم
const processor = new NanoAI.TextProcessor({
    language: 'ar',
    features: {
        sentiment: true,
        entities: true,
        relations: true
    },
    models: {
        word2vec: true,
        bert: true
    }
});

// تحليل نص متقدم
const text = 'نص طويل للتحليل...';
const analysis = await processor.analyze(text, {
    tasks: ['sentiment', 'topics', 'summary'],
    options: {
        depth: 'deep',
        context: true,
        visualization: true
    }
});

// استخراج العلاقات
const relations = await processor.extractRelations(text, {
    types: ['causal', 'temporal', 'spatial'],
    confidence: 0.8
});

// توليد ملخص
const summary = await processor.generateSummary(text, {
    method: 'extractive',
    length: 'medium',
    focus: ['main_points', 'conclusions']
});

📚 الوثائق التفصيلية

AdaptiveLearning

الفئة المسؤولة عن تكييف المحتوى التعليمي حسب مستوى المتعلم.

الخصائص

  • currentLevel: المستوى الحالي للمتعلم
  • performanceHistory: سجل أداء المتعلم
  • learningRate: معدل التعلم

الدوال

  • assessPerformance(score, total): تقييم أداء المتعلم
  • generateExercise(): توليد تمرين جديد
  • adjustLevel(performance): تعديل المستوى
  • getRecommendedTopics(): الحصول على المواضيع المقترحة

ContentGenerator

فئة لتوليد المحتوى التعليمي التفاعلي.

الخصائص

  • supportedLanguages: اللغات المدعومة
  • currentLanguage: اللغة الحالية

الدوال

  • generateLesson(topic, options): توليد درس
  • generateExercises(topic, difficulty): توليد تمارين
  • generateVisualAids(topic): توليد مساعدات بصرية
  • formatLesson(lesson, format): تنسيق الدرس

TextProcessor

فئة لمعالجة النصوص وتحليلها.

الخصائص

  • vocabulary: قاموس المفردات
  • nGramSize: حجم المقاطع النصية

الدوال

  • tokenize(text): تقطيع النص
  • buildVocabulary(texts): بناء المفردات
  • textToVector(text): تحويل النص إلى متجه
  • cosineSimilarity(vec1, vec2): حساب التشابه

NeuralNetwork

فئة للشبكات العصبية وتعلم الآلة.

الخصائص

  • layers: طبقات الشبكة
  • weights: الأوزان
  • biases: الانحيازات

الدوال

  • train(data, config): تدريب النموذج
  • predict(input): التنبؤ
  • serialize(): تحويل النموذج لنص
  • deserialize(data): إنشاء نموذج من نص

🤝 المساهمة

نرحب بمساهماتكم! يرجى اتباع الخطوات التالية:

  1. انسخ المشروع (Fork)
  2. أنشئ فرع جديد (git checkout -b feature/amazing-feature)
  3. قم بالتعديلات
  4. أضف التغييرات (git add .)
  5. اعتمد التغييرات (git commit -m 'إضافة ميزة رائعة')
  6. ارفع التغييرات (git push origin feature/amazing-feature)
  7. أنشئ طلب دمج (Pull Request)

معايير المساهمة

  • ✅ اكتب اختبارات لكل ميزة جديدة
  • ✅ حدّث الوثائق عند إضافة ميزات
  • ✅ اتبع معايير كتابة الكود
  • ✅ اختبر الكود قبل إرسال طلب الدمج

📝 الترخيص

هذا المشروع مرخص تحت رخصة MIT - انظر ملف LICENSE للتفاصيل.

❓ الأسئلة الشائعة

س: هل يمكن استخدام المكتبة في بيئة الإنتاج؟ ج: نعم، المكتبة مصممة للاستخدام في بيئات التطوير والإنتاج.

س: هل تدعم المكتبة العمل على وحدات معالجة الرسومات (GPU)؟ ج: حالياً لا، لكن هذه الميزة قيد التطوير.

س: كيف يمكنني المساهمة في المشروع؟ ج: راجع قسم "المساهمة" أعلاه.

🔗 روابط مفيدة


English Version

NanoAI 🤖

A lightweight, privacy-focused local AI library for Node.js with zero external dependencies.

🌟 Key Features

1. Adaptive Learning System

  • 🎯 Automatic learner level analysis
  • 📚 Content adaptation based on level
  • 📊 Detailed progress reports
  • 🔄 Continuous learning path updates

2. Educational Content Generation

  • 📝 Interactive lessons
  • 🎨 Charts and mind maps
  • 🌍 Multi-language support
  • 📤 Multiple export formats

3. Advanced Text Processing

  • 🔍 Content analysis
  • 📊 Text vectorization
  • 🎯 Keyword extraction
  • 🔄 Pattern discovery

4. Neural Networks

  • 🧠 Deep learning models
  • 📈 Training and prediction
  • 💾 Model persistence
  • 🔧 Tuning and optimization

📋 System Requirements

  • Node.js v16 or later
  • RAM: Minimum 512MB
  • Storage: Minimum 100MB
  • OS: Windows 10+, macOS 10.14+, Linux (any modern distribution)

⚙️ Installation

npm install nanoai

🚀 Quick Start

Adaptive Learning System

const NanoAI = require('nanoai');

// Create adaptive learning system
const tutor = new NanoAI.AdaptiveLearning();

// Assess learner performance
const assessment = tutor.assessPerformance(8, 10);
console.log('Current Level:', assessment.currentLevel);
console.log('Recommended Topics:', assessment.recommendedTopics);

// Generate new exercise
const exercise = tutor.generateExercise();
console.log('Exercise:', exercise);

// Advanced examples
const complexAssessment = tutor.assessPerformance(8, 10, {
    topic: 'machine_learning',
    subtopics: ['neural_networks', 'deep_learning'],
    previousScores: [7, 8, 9],
    timeSpent: 45 // minutes
});

Content Generation

const NanoAI = require('nanoai');

// Create content generator
const generator = new NanoAI.ContentGenerator();

// Generate interactive lesson
const lesson = await generator.generateLesson('Artificial Intelligence', {
    language: 'en',
    difficulty: 'intermediate',
    format: 'markdown',
    includeExercises: true,
    includeDiagrams: true
});

// Generate advanced content
const advancedContent = await generator.generateLesson('Machine Learning', {
    format: 'html',
    styles: {
        theme: 'dark',
        fontSize: '16px',
        codeHighlight: true
    },
    components: {
        interactiveDemo: true,
        codeEditor: true,
        quizzes: true
    }
});

Text Processing

const NanoAI = require('nanoai');

// Create text processor
const processor = new NanoAI.TextProcessor();

// Build vocabulary
processor.buildVocabulary([
    'machine learning is amazing',
    'artificial intelligence transforms technology',
    'deep learning revolutionizes AI'
]);

// Convert text to vector
const vector = processor.textToVector('machine learning');

// Compare texts
const similarity = processor.cosineSimilarity(
    processor.textToVector('artificial intelligence'),
    processor.textToVector('machine learning')
);

// Advanced analysis
const analysis = processor.analyzeText('long text for analysis', {
    extractKeywords: true,
    findPatterns: true,
    sentimentAnalysis: true,
    languageDetection: true
});

Neural Networks

const NanoAI = require('nanoai');

// Create neural network
const nn = new NanoAI.Model([2, 8, 4, 1], {
    learningRate: 0.1,
    momentum: 0.9,
    activation: 'sigmoid'
});

// Training data
const trainingData = [
    { input: [0, 0], output: [0] },
    { input: [0, 1], output: [1] },
    { input: [1, 0], output: [1] },
    { input: [1, 1], output: [0] }
];

// Advanced training
const trainingConfig = {
    epochs: 1000,
    batchSize: 4,
    validationSplit: 0.2,
    earlyStoppingPatience: 10,
    callbacks: {
        onEpochEnd: (epoch, metrics) => {
            console.log(`Epoch ${epoch}: loss = ${metrics.loss}`);
        }
    }
};

// Train model
nn.train(trainingData, trainingConfig);

// Make predictions
console.log('Prediction:', nn.predict([1, 0]));

// Save model
const serialized = nn.serialize();
localStorage.setItem('model', serialized);

// Load model
const loaded = NanoAI.Model.deserialize(localStorage.getItem('model'));