bilingual-summarizer-api / api /postman_collection.json
fin09
Deploy Bilingual Summarization NLP Suite with Git LFS
3d9ba5b
Raw History Blame Contribute Delete
12.9 kB
{
"info": {
"_postman_id": "8a7c2e1b-9f44-4e12-b283-9b1c93847250",
"name": "Bilingual Text Summarization NLP API",
"description": "Comprehensive Postman API Collection for Arabic & English Automatic Text Summarization System.\nSupports Extractive algorithms (TextRank, LSA, Hybrid), Abstractive Deep Learning (Seq2Seq + Attention), File Ingestion (.txt, .pdf, .docx), and ROUGE/BLEU Evaluation.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "1. System & Metadata",
"item": [
{
"name": "Health Check & Hardware Status",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/api/v1/health",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"health"
]
},
"description": "Checks server health, PyTorch CUDA availability, and loaded model checkpoints."
},
"response": []
},
{
"name": "List Available Models & Algorithms",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/api/v1/models",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"models"
]
},
"description": "Returns all available Extractive and Abstractive algorithms and their checkpoint availability."
},
"response": []
}
]
},
{
"name": "2. NLP Core & Preprocessing",
"item": [
{
"name": "Detect Language (Arabic)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"text\": \"اعلنت وكالة ناسا الفضائية عن خطط طموحة للعودة الى سطح القمر في اطار برنامج ارتيميس.\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/v1/detect-language",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"detect-language"
]
},
"description": "Detects language, script breakdown (Arabic vs Latin), and confidence score."
},
"response": []
},
{
"name": "Detect Language (English)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"text\": \"Global semiconductor shortages are easing according to the latest industry report with chip inventories returning to normal.\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/v1/detect-language",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"detect-language"
]
},
"description": "Detects English text with script breakdown."
},
"response": []
},
{
"name": "Tokenize & Normalize Text",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"text\": \"الذكاءُ الاصطناعيُّ يُحدِث ثورةً كبرى في معالجة اللغات الطبيعية! هل يمكن للنماذج فهم السياق؟ نعم، بالتأكيد.\",\n \"lang\": \"ar\",\n \"remove_stopwords\": false,\n \"stem\": false\n}"
},
"url": {
"raw": "{{baseUrl}}/api/v1/tokenize",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"tokenize"
]
},
"description": "Performs Arabic diacritic removal (Tashkeel), normalization, sentence boundary detection, and tokenization."
},
"response": []
}
]
},
{
"name": "3. Text Summarization",
"item": [
{
"name": "Summarize Arabic (Seq2Seq Abstractive 20-Ep)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"text\": \"اعلنت وكالة ناسا الفضائية الامريكية عن خطط طموحة للعودة الى سطح القمر في اطار برنامج ارتيميس حيث ستشمل البعثة اول امراة واول شخص من ذوي البشرة الداكنة يمشيان على سطح القمر ومن المقرر ان تنطلق البعثة قبل نهاية عام الفين وخمسة وعشرين.\",\n \"mode\": \"abstractive\",\n \"method\": \"seq2seq\",\n \"lang\": \"ar\",\n \"beam_width\": 3,\n \"reference_summary\": \"ناسا تعلن خطط العودة للقمر عبر برنامج ارتيميس الذي سيضم اول امراة واول شخص من ذوي البشرة الداكنة قبل نهاية 2025\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/v1/summarize",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"summarize"
]
},
"description": "Deep learning abstractive summarization using trained Seq2Seq Bi-GRU + Bahdanau Attention model."
},
"response": []
},
{
"name": "Summarize Arabic (TextRank Extractive)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"text\": \"شهدت الاسواق العالمية تراجعا حادا في اسعار النفط الخام بعد قرار منظمة اوبك زيادة الانتاج. ادى ذلك الى انخفاض سعر برميل النفط الى ما دون الثمانين دولارا للمرة الاولى منذ عام كامل. تشير التوقعات الى استمرار الضغط على الاسعار في الفترة القادمة نظرا لتباطؤ النمو الاقتصادي العالمي. اكد خبراء الطاقة ان هذه التحولات ستنعكس ايجابا على معدلات التضخم في الدول المستهلكة.\",\n \"mode\": \"extractive\",\n \"method\": \"textrank\",\n \"lang\": \"ar\",\n \"sentences\": 2\n}"
},
"url": {
"raw": "{{baseUrl}}/api/v1/summarize",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"summarize"
]
},
"description": "Unsupervised graph-based extractive summarization using PageRank sentence centrality."
},
"response": []
},
{
"name": "Summarize English (Seq2Seq Abstractive 20-Ep)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"text\": \"Global semiconductor shortages are easing according to the latest industry report with chip inventories returning to normal levels across multiple sectors including automotive and consumer electronics as major manufacturers in Taiwan and South Korea expand production capacity.\",\n \"mode\": \"abstractive\",\n \"method\": \"seq2seq\",\n \"lang\": \"en\",\n \"beam_width\": 3\n}"
},
"url": {
"raw": "{{baseUrl}}/api/v1/summarize",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"summarize"
]
},
"description": "English Seq2Seq abstractive summarization."
},
"response": []
},
{
"name": "Summarize English (Hybrid Extractive)",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"text\": \"Renewable energy adoption reached a record high in 2024 according to the International Energy Agency report. Solar photovoltaics and wind power accounted for eighty percent of all new electricity capacity added globally. European nations led the transition with ambitious targets to reduce carbon emissions by sixty percent before 2035.\",\n \"mode\": \"extractive\",\n \"method\": \"hybrid\",\n \"lang\": \"en\",\n \"sentences\": 2\n}"
},
"url": {
"raw": "{{baseUrl}}/api/v1/summarize",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"summarize"
]
},
"description": "Hybrid extractive algorithm combining graph centrality, positional bias, and sentence length penalty."
},
"response": []
},
{
"name": "Summarize Uploaded Document File (.pdf / .docx / .txt)",
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "file",
"type": "file",
"src": ""
},
{
"key": "mode",
"value": "extractive",
"type": "text"
},
{
"key": "method",
"value": "hybrid",
"type": "text"
},
{
"key": "lang",
"value": "auto",
"type": "text"
},
{
"key": "sentences",
"value": "3",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/api/v1/summarize/file",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"summarize",
"file"
]
},
"description": "Multipart file upload endpoint. Automatically extracts text from PDF, DOCX, or TXT and generates a summary."
},
"response": []
}
]
},
{
"name": "4. Evaluation & Metrics Suite",
"item": [
{
"name": "Compute ROUGE & BLEU Scores",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"original_text\": \"اعلنت وكالة ناسا الفضائية الامريكية عن خطط طموحة للعودة الى سطح القمر في اطار برنامج ارتيميس حيث ستشمل البعثة اول امراة واول شخص من ذوي البشرة الداكنة يمشيان على سطح القمر.\",\n \"generated_summary\": \"ناسا تعلن خطط العودة للقمر عبر برنامج ارتيميس الذي سيضم اول امراة واول شخص من ذوي البشرة الداكنة\",\n \"reference_summary\": \"ناسا تعلن خطط العودة لسطح القمر عبر برنامج ارتيميس مع اول امراة وشخص من ذوي البشرة الداكنة\",\n \"lang\": \"ar\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/v1/evaluate",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"evaluate"
]
},
"description": "Calculates ROUGE-1/2/L (Precision, Recall, F1), BLEU-1..4, Cumulative BLEU, and Type-Token Ratio (TTR)."
},
"response": []
}
]
}
],
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test(\"Status code is 200 OK\", function () {",
" pm.response.to.have.status(200);",
"});",
"pm.test(\"Response is valid JSON\", function () {",
" pm.response.to.be.json;",
"});",
"pm.test(\"Response time is acceptable (< 2000ms)\", function () {",
" pm.expect(pm.response.responseTime).to.be.below(2000);",
"});"
]
}
}
],
"variable": [
{
"key": "baseUrl",
"value": "http://localhost:8000",
"type": "string"
}
]
}