Extraction-based Turkish news summarizer.
Project description
SadedeGel: An extraction based Turkish news summarizer
SadedeGel is a library for extraction-based news summarizer using pretrained BERT model. Development of the library takes place as a part of Açık Kaynak Hackathon Programı 2020
💫 Version 0.3.3 out now! Check out the release notes here.
📖 Documentation
Documentation | |
---|---|
Contribute | How to contribute to the sadedeGel project and code base. |
💬 Where to ask questions
The SadedeGel project is maintained by @globalmaksmum AI team members @dafajon, @askarbozcan, @mccakir and @husnusensoy.
Type | Platforms |
---|---|
🚨 Bug Reports | GitHub Issue Tracker |
🎁 Feature Requests | GitHub Issue Tracker |
Features
Coming soon...
📖 **For more details, see the
Coming soon...
Install sadedeGel
- Operating system: macOS / OS X · Linux · Windows (Cygwin, MinGW, Visual Studio)
- Python version: 3.5+ (only 64 bit)
- Package managers: pip
pip
Using pip, sadedeGel releases are available as source packages and binary wheels.
pip install sadedegel
When using pip it is generally recommended to install packages in a virtual environment to avoid modifying system state:
python -m venv .env
source .env/bin/activate
pip install sadedegel
conda
Coming soon...
Quickstart with SadedeGel
To load SadedeGel, use sadedegel.load()
import sadedegel
from sadedegel.dataset import load_sentence_corpus, load_raw_corpus
nlp = sadedegel.load()
tokenized = load_sentence_corpus()
raw = load_raw_corpus()
summary = nlp(raw[0])
summary = nlp(tokenized[0], sentence_tokenizer=False)
To use our ML based sentence boundary detector
from sadedegel.tokenize import Doc
doc = ("Bilişim sektörü, günlük devrimlerin yaşandığı ve hızına yetişilemeyen dev bir alan haline geleli uzun bir zaman olmadı. Günümüz bilgisayarlarının tarihi, yarım asırı yeni tamamlarken; yaşanan gelişmeler çok"
"daha büyük ölçekte. Türkiye de bu gelişmelere 1960 yılında Karayolları Umum Müdürlüğü (şimdiki Karayolları Genel Müdürlüğü) için IBM’den satın aldığı ilk bilgisayarıyla dahil oldu. IBM 650 Model I adını taşıyan bilgisayarın"
"satın alınma amacı ise yol yapımında gereken hesaplamaların daha hızlı yapılmasıydı. Türkiye’nin ilk bilgisayar destekli karayolu olan 63 km uzunluğundaki Polatlı - Sivrihisar yolu için yapılan hesaplamalar IBM 650 ile 1 saatte yapıldı. "
"Daha öncesinde 3 - 4 ayı bulan hesaplamaların 1 saate inmesi; teknolojinin, ekonomik ve toplumsal dönüşüme büyük etkide bulunacağının habercisiydi.")
Doc(doc).sents
['Bilişim sektörü, günlük devrimlerin yaşandığı ve hızına yetişilemeyen dev bir alan haline geleli uzun bir zaman olmadı.',
'Günümüz bilgisayarlarının tarihi, yarım asırı yeni tamamlarken; yaşanan gelişmeler çokdaha büyük ölçekte.',
'Türkiye de bu gelişmelere 1960 yılında Karayolları Umum Müdürlüğü (şimdiki Karayolları Genel Müdürlüğü) için IBM’den satın aldığı ilk bilgisayarıyla dahil oldu.',
'IBM 650 Model I adını taşıyan bilgisayarınsatın alınma amacı ise yol yapımında gereken hesaplamaların daha hızlı yapılmasıydı.',
'Türkiye’nin ilk bilgisayar destekli karayolu olan 63 km uzunluğundaki Polatlı - Sivrihisar yolu için yapılan hesaplamalar IBM 650 ile 1 saatte yapıldı.',
'Daha öncesinde 3 - 4 ayı bulan hesaplamaların 1 saate inmesi; teknolojinin, ekonomik ve toplumsal dönüşüme büyük etkide bulunacağının habercisiydi.']
SadedeGel Server
In order to integrate with your applications we provide a quick summarizer server with sadedeGel.
python3 -m sadedegel.server
Refer to self documenting APIs for details (http://localhost:8000/docs or http://localhost:8000/redoc by default)
PyLint, Flake8 and Bandit
sadedeGel utilized pylint for static code analysis, flake8 for code styling and bandit for code security check.
To run all tests
make lint
Run tests
sadedeGel comes with an extensive test suite. In order to run the
tests, you'll usually want to clone the repository and build sadedeGel from source.
This will also install the required development dependencies and test utilities
defined in the requirements.txt
.
Alternatively, you can find out where sadedeGel is installed and run pytest
on
that directory. Don't forget to also install the test utilities via sadedeGel's
requirements.txt
:
make test
References
Software Engineering
- Special thanks to spaCy project for their work in showing us the way to implement a proper python module rather than merely explaining it.
- We have borrowed many document and style related stuff from their code base :smile:
Machine Learning (ML), Deep Learning (DL) and Natural Language Processing (NLP)
-
Resources on Extractive Text Summarization:
- Leveraging BERT for Extractive Text Summarization on Lectures by Derek Miller
- Fine-tune BERT for Extractive Summarization by Yang Liu
-
Other NLP related references
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sadedegel-0.3.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74247e918bcbb0334dd5e5c9780c22ba636f6a36860c9f7ecd5a1358c776a759 |
|
MD5 | 5a6ca0cd54f49b2fc21acaf6925d6794 |
|
BLAKE2b-256 | 03833a66104270109ac4cf277242c05b693ae758804f9bc7b644e3c5482e401b |