Parsy (Parsy v0.1.5) View Source
Parsy is a fast syllable-parser for English-language strings. It implements a standard algorithm and runs in parallel, making it an efficient and reliable solution for text-processing. Parsy accepts a string and returns a map with the following values:
:syl_count: an integer. The total number of syllables instring:words: a list of lists. Each word instringand its individual:syl_count:complex_words: a list of lists. Each complex word instringand its individual:syl_count. In English, a complex word is any word with three or more syllables. This value is often used to calculate readability scores.:complex_count: an integer. The total number ofcomplex_wordsinstring.
Link to this section Summary
Functions
Usage
Pass a string to Parsy.main()
Link to this section Functions
Usage
Pass a string to Parsy.main():
iex> Parsy.main("let's parse some syllables!")
process #PID<0.228.0>: syllabifying "{#PID<0.231.0>, #Reference<0.1896839920.1939079179.3341>}"Every time Parsy spawns a new process, it will print an associated PID and reference number to the screen.
Once the computation completes, Parsy returns a map:
%{
complex: [["syllables", 3]],
complex_count: 1,
syl_count: 6,
words: [{"lets", 1}, {"parse", 1}, {"some", 1}, {"syllables", 3}]
}