Pytextrank هو تنفيذ Python لـ Textrank كملحق لخط أنابيب Spacy ، لعمل اللغة الطبيعية القائمة على الرسم البياني-وممارسات الرسم البياني المعرفة ذات الصلة. وهذا يشمل عائلة خوارزميات Textgraph :
تشمل حالات الاستخدام الشائعة لهذه المكتبة:
انظر وثائقنا الكاملة على: https://derwen.ai/docs/ptr/
راجع قسم "البدء" في الوثائق عبر الإنترنت.
للتثبيت من PYPI:
python3 -m pip install pytextrank
python3 -m spacy download en_core_web_sm
إذا كنت تعمل مباشرة من هذا الريبو git ، فتأكد من تثبيت التبعيات أيضًا:
python3 -m pip install -r requirements.txt
بدلاً من ذلك ، لتثبيت التبعيات باستخدام conda :
conda env create -f environment.yml
conda activate pytextrank
ثم لاستخدام المكتبة مع حالة استخدام بسيطة:
import spacy
import pytextrank
# example text
text = "Compatibility of systems of linear constraints over the set of natural numbers. Criteria of compatibility of a system of linear Diophantine equations, strict inequations, and nonstrict inequations are considered. Upper bounds for components of a minimal set of solutions and algorithms of construction of minimal generating sets of solutions for all types of systems are given. These criteria and the corresponding algorithms for constructing a minimal supporting set of solutions can be used in solving all the considered types systems and systems of mixed types."
# load a spaCy model, depending on language, scale, etc.
nlp = spacy . load ( "en_core_web_sm" )
# add PyTextRank to the spaCy pipeline
nlp . add_pipe ( "textrank" )
doc = nlp ( text )
# examine the top-ranked phrases in the document
for phrase in doc . _ . phrases :
print ( phrase . text )
print ( phrase . rank , phrase . count )
print ( phrase . chunks ) راجع دفاتر الملاحظات التعليمية في examples الدليل الفرعي للعينة من الكود والأنماط التي يجب استخدامها في دمج PytextTank مع المكتبات ذات الصلة في Python: https://derwen.ai/docs/ptr/tutorial/
نرحب بالأشخاص المشاركين كمساهمين في هذا المشروع مفتوح المصدر!
للحصول على تعليمات مفصلة يرجى الاطلاع على: المساهمة. md
بدلاً من ذلك ، ما عليك سوى التثبيت من PYPI أو استخدم Conda.
لإعداد بيئة الإنشاء محليًا ، راجع قسم "تعليمات البناء" في الوثائق عبر الإنترنت.
بشكل عام ، سيتتبع رقم الإصدار الرئيسي من Pytextrank مع رقم الإصدار الرئيسي لإصدار spaCy المرتبط.
انظر: changelog.md
رمز المصدر لـ Pytextrank بالإضافة إلى شعاره وتوثيقه وأمثلة له ترخيص معهد ماساتشوستس للتكنولوجيا مختصرة ويبسط الاستخدام في التطبيقات التجارية.
جميع المواد الواردة هنا هي حقوق الطبع والنشر © 2016-2024 Derwen ، Inc.
يرجى استخدام إدخال bibtex التالي للاستشهاد pytextrank إذا كنت تستخدمه في بحثك أو برنامجك:
@software { PyTextRank ,
author = { Paco Nathan } ,
title = { {PyTextRank, a Python implementation of TextRank for phrase extraction and summarization of text documents} } ,
year = 2016 ,
publisher = { Derwen } ,
doi = { 10.5281/zenodo.4637885 } ,
url = { https://github.com/DerwenAI/pytextrank }
}الاستشهادات مفيدة لتطوير وصيانة هذه المكتبة. على سبيل المثال ، راجع الاستشهادات المدرجة على الباحث العلمي من Google.
شكرا جزيلا للجهات الراعية المصدر المفتوح ؛ وإلى مساهمينا: ceteri ، @louisguitton ، @ankush-chander ، tomaarsen ، captxiong ، @lord-v15 ، @anna-droid-beep ، dvsrepo ، @clabornd ، @dayalstrub-cma ، kavorite ، @ @htmartin ، @williasmj ، harshgrandeur ، @mnowotka ، kjam ، saithejeshwar ، @laxatives ، dimmu ، @jasonzhangzy1757 ، @jake -aft ، @junchen1992 ، shyamcody ، chikubee ؛ أيضا إلى mihalcea الذي يقود أعمال البحث المتميزة في NLP ، والتشجيع من الناس الرائعين في الانفجار الذين يطورون Spacy ، بالإضافة إلى دعم عام من Derwen ، Inc.