All Projects → joom → Divan.hs

joom / Divan.hs

Licence: MIT license
Ottoman Divan poetry vezin checker in Haskell!

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to Divan.hs

symmetric
A powerful tool to enable super fast module-to-API transformations. Learn in minutes, implement in seconds. Batteries included.
Stars: ✭ 65 (+75.68%)
Mutual labels:  poetry
cookiecutter-modern-pypackage
Cookiecutter template for a modern Python package.
Stars: ✭ 97 (+162.16%)
Mutual labels:  poetry
Text-Generate-RNN
中国古诗生成(文本生成)
Stars: ✭ 106 (+186.49%)
Mutual labels:  poetry
phpwaf-phanalyzer
AliGuard PHP WAF
Stars: ✭ 12 (-67.57%)
Mutual labels:  turkish
fish-poetry
🐟🐍 a fish plugin that automatically activates the poetry subshell
Stars: ✭ 25 (-32.43%)
Mutual labels:  poetry
turkish banks
All Turkish Banks and Their Branches
Stars: ✭ 28 (-24.32%)
Mutual labels:  turkish
tyrannosaurus
Generate beautifully modern (2021+) Python projects with seamless, GitHub-based CI/CD, Docker and Conda support, and out-of-the-box integration with >30 best-practices tools and standards.
Stars: ✭ 88 (+137.84%)
Mutual labels:  poetry
ruby-tr
Ruby Türkiye Topluluk Sitesi
Stars: ✭ 50 (+35.14%)
Mutual labels:  turkish
language-detector
Detect the language of text
Stars: ✭ 28 (-24.32%)
Mutual labels:  turkish
poemexe
Code for the poem.exe bot on Twitter and Mastodon.
Stars: ✭ 17 (-54.05%)
Mutual labels:  poetry
desktop
گنجور رومیزی
Stars: ✭ 50 (+35.14%)
Mutual labels:  poetry
weapp-poem
诗词墨客 - 最全中华古诗词小程序
Stars: ✭ 409 (+1005.41%)
Mutual labels:  poetry
bilkent-turkish-writings-dataset
Turkish writings dataset that promotes creativity, content, composition, grammar, spelling and punctuation.
Stars: ✭ 30 (-18.92%)
Mutual labels:  turkish
startup-sozlugu
Startup dünyasında sık kullan kelimeler ve terimler
Stars: ✭ 21 (-43.24%)
Mutual labels:  turkish
Saaghar
“Saaghar” (ساغر) is a Persian poetry software written by C++ under Qt framework, it uses "ganjoor" database as its database. It has tab feature in both its “Viewer” and its “Search” page that cause it be suitable for research goals.
Stars: ✭ 42 (+13.51%)
Mutual labels:  poetry
almanca
Almanca dilbilgisi ve gramer notlari / Lesson notes I have taken to learn the German language beginning from A1.
Stars: ✭ 15 (-59.46%)
Mutual labels:  turkish
backend-best-practices
Backend uygulamaları geliştirirken dikkate alınabilecek örnek yöntemlerin derlendiği güncellenen bir kaynak.
Stars: ✭ 80 (+116.22%)
Mutual labels:  turkish
poesy
Poetry generation via natural language markov models
Stars: ✭ 56 (+51.35%)
Mutual labels:  poetry
Turkish-Lemmatizer
Lemmatization for Turkish Language
Stars: ✭ 72 (+94.59%)
Mutual labels:  turkish
poet-v
Vim Meets Poetry and Pipenv Virtual Environments
Stars: ✭ 57 (+54.05%)
Mutual labels:  poetry

Divan.hs Build Status

A Haskell program to check the vezin (meter) of Ottoman Divan poetry.

If you want to learn more about the meter of these poems, this is a place to start. This repository currently does not have much documentation about why things are the way they are, since it's mostly related to the grammatical rules of Turkish and the prosody rules of Divan poetry.

What does this do?

Currently, all Divan.hs does is to check the vezin patterns of a verse.

Tests should explain what Divan.hs currently is able to do. View tests/tests.hs to read the tests or run cabal test on your terminal to see the test results.

Divan.Tefile.detectTefile function currently doesn't cover all vezin patterns, it needs Divan.Tefile.tefileMap to be expanded. But still, Divan.Tefile now is able to take a verse and return the tefile names, such as "mefâilün mefâilün feûlün". (Tef'ile's are the vezin pattern names.)

In the long run, it should aim to generate simple Divan poems by using the mazmun (imagery) patterns for a given vezin. But there is no work on that yet.

How do I use it?

In order to use or compile the program you need to have Haskell installed.

You also need to install Guguk, an unstable library NLP library for Turkish, which is why it is not on Hackage yet. You can install Guguk with these commands:

git clone https://github.com/joom/Guguk.git && cd Guguk && cabal install

To install the library

cabal install

REPL

cabal repl

Running the tests

cabal test

To build the executable

cabal build divan

This is the terminal command to run Divan.hs on a part of one of Fuzûlî's ghazal's.

# assuming default build location
./dist/build/Divan/divan example/input.txt

And this is the output we got from the program, for that ghazal excerpt:

Öyle ser-mestem ki idrâk etmezem dünyâ nedir
öy - le - ser - mes - tem - ki - id - râ - ket - me - zem - dün - yâ - ne - dir
-.---.---.---.-
fâilâtün / fâilâtün / fâilâtün / fâilün

Ben kimem sâkî olan kimdir mey û sahbâ nedir
ben - ki - mem - sâ - kî - o - lan - kim - dir - me - yû - sah - bâ - ne - dir
-.---.---.---.-
fâilâtün / fâilâtün / fâilâtün / fâilün


Âh u feryâdın Fuzûlî incidibdir' âlemi
â - hu - fer - yâ - dın - fu - zû - lî - in - ci - dib - dir - â - le - mi
-.---.---.---.-
fâilâtün / fâilâtün / fâilâtün / fâilün

Ger belâ-yı ışk' ile hoşnûd' isen gavga nedir
ger - be - lâ - yı - ışk - i - le - hoş - nûd - i - sen - gav - ga - ne - dir
-.-.-..--..--..-
fâilün / müfâ'aletün / müfteilün / müfteilün

The first line is the verse itself. The second line is how the program syllablizes the verse. The third line is the symbol string for the vezin (list of Open and Closed). The fourth line is a tef'ile list suggestion.

The last verse of this excerpt is incorrect, because the program cannot yet detect the aruz flaws (kusur) that are made on purpose. However, it must be pretty much functional so far!

Further Documentation

Haddock generated documentation can be read from here.

License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].