Giter Club home page Giter Club logo

syllapy's People

Contributors

deepsourcebot avatar harrisj avatar pyup-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

syllapy's Issues

Initial Update

The bot created this issue to inform you that pyup.io has been set up on this repo.
Once you have closed it, the bot will open pull requests for updates as soon as they are available.

DeprecationWarning: pkg_resources

I see this while running my tests

Iโ€™m not importing syllapy directly, it is a dependency of a dependency of mine

.venv/lib/python3.11/site-packages/syllapy/data_loader.py:3
  /opt/clones/github/jalanb/zatsos/zatso/.venv/lib/python3.11/site-packages/syllapy/data_loader.py:3: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

Are you still interested in maintaining this project?

Hello there!

Thank you for writing syllapy! I have used it to help relaunch the NYT Haiku Twitter bot (see the Github repo for details) and it was such a tremendous relief to be able to use your library instead of keeping a dictionary of syllable counts I had to load. I would like to contribute some things back to this repo though and I wanted to check if you still were interested in maintaining it so I'm not bothering you incessantly if you don't have the time or bandwidth? Thank you.

Best way to give you new syllable count exceptions?

I have been doing some spot checks and have about 445 additional exceptions for syllable counts I can add to the file you have. I realize though that it might be a really frustrating experience to review as a PR, especially if you didn't want to add some of them. Is there a preferred way I should contribute some additions back to you:

  1. One big PR with all the changes
  2. Staggered across several PRs, perhaps alphabetically?
  3. Let you figure out what exceptions you want to add and not add (you can always check my list of exceptions)

I also wanted to share that it does look like there are few cases that seem to repeat a bit, in case it's useful for your algorithm (many of them seem like special cases):

  1. Past-tense words that end in -sed or -ked like poised or marked are often coded as 2 syllables
  2. Words that end in e that are pluralized like graves or gives
  3. Words that end in -ism like journalism or socialism seem to undercount the last syllable
  4. Words that end in -ly seem to not count the adverb syllable

I also realize this is controversial, but I count hour as 2 syllables for instance, but I don't know if everybody does

Capitalized words in load_dict() are not found

  • SyllaPy version: 0.4.0
  • Python version: 3.6.6
  • Operating System: Ubuntu 16.04

Description

Words such as 'Ohio' and 'Norway' exist in dict returned from load_dict(). However, when you call syllapy.count('Ohio'), the count() function converts it to lowercase, so it is not found in the dictionary, and 2 is returned instead of the value of 3 in the dict.

Add an API method to supplement the preloaded dict with additional explicit syllable counts?

As I mentioned, I am running a haiku finding bot against the New York Times so I keep finding new exceptions to be added to the list (for instance, I think today there was "falsehoods" and "reconciliation"). Although my intention is to make regular pull requests with syllable changes, I would like to supplement the load_dict method with another method I can call to supplement syllapy's exceptions with my own JSON (or CSV if you decide that approach is okay). This way I can make immediate and incremental patches to behavior on my end and then roll up into larger regular PRs

PIP Install Errors

Building wheel for ujson (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\matt\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Matt\AppData\Local\Temp\pip-install-l0j0afpg\ujson_7ec301c0567b44aab36a8e2e995eace9\setup.py'"'"'; file='"'"'C:\Users\Matt\AppData\Local\Temp\pip-install-l0j0afpg\ujson_7ec301c0567b44aab36a8e2e995eace9\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Matt\AppData\Local\Temp\pip-wheel-i22n_1iy'
cwd: C:\Users\Matt\AppData\Local\Temp\pip-install-l0j0afpg\ujson_7ec301c0567b44aab36a8e2e995eace9
Complete output (14 lines):
Warning: 'classifiers' should be a list, got type 'filter'
running bdist_wheel
running build
running build_ext
building 'ujson' extension
creating build
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\lib
creating build\temp.win-amd64-3.9\Release\python
d:\Data\apps\VS2019\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I./python -I./lib -Ic:\users\matt\appdata\local\programs\python\python39\include -Ic:\users\matt\appdata\local\programs\python\python39\include -Id:\Data\apps\VS2019\VC\Tools\MSVC\14.26.28801\ATLMFC\include -Id:\Data\apps\VS2019\VC\Tools\MSVC\14.26.28801\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um /Tc./lib/ultrajsondec.c /Fobuild\temp.win-amd64-3.9\Release./lib/ultrajsondec.obj -D_GNU_SOURCE
ultrajsondec.c
C:\Users\Matt\AppData\Local\Temp\pip-install-l0j0afpg\ujson_7ec301c0567b44aab36a8e2e995eace9\lib\ultrajson.h(56): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
error: command 'd:\Data\apps\VS2019\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64\cl.exe' failed with exit code 2

ERROR: Failed building wheel for ujson
Running setup.py clean for ujson
Failed to build ujson
Installing collected packages: ujson, syllapy
Running setup.py install for ujson ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\matt\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Matt\AppData\Local\Temp\pip-install-l0j0afpg\ujson_7ec301c0567b44aab36a8e2e995eace9\setup.py'"'"'; file='"'"'C:\Users\Matt\AppData\Local\Temp\pip-install-l0j0afpg\ujson_7ec301c0567b44aab36a8e2e995eace9\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Matt\AppData\Local\Temp\pip-record-eobpo6yh\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\matt\appdata\local\programs\python\python39\Include\ujson'
cwd: C:\Users\Matt\AppData\Local\Temp\pip-install-l0j0afpg\ujson_7ec301c0567b44aab36a8e2e995eace9
Complete output (14 lines):
Warning: 'classifiers' should be a list, got type 'filter'
running install
running build
running build_ext
building 'ujson' extension
creating build
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\lib
creating build\temp.win-amd64-3.9\Release\python
d:\Data\apps\VS2019\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I./python -I./lib -Ic:\users\matt\appdata\local\programs\python\python39\include -Ic:\users\matt\appdata\local\programs\python\python39\include -Id:\Data\apps\VS2019\VC\Tools\MSVC\14.26.28801\ATLMFC\include -Id:\Data\apps\VS2019\VC\Tools\MSVC\14.26.28801\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um /Tc./lib/ultrajsondec.c /Fobuild\temp.win-amd64-3.9\Release./lib/ultrajsondec.obj -D_GNU_SOURCE
ultrajsondec.c
C:\Users\Matt\AppData\Local\Temp\pip-install-l0j0afpg\ujson_7ec301c0567b44aab36a8e2e995eace9\lib\ultrajson.h(56): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
error: command 'd:\Data\apps\VS2019\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\matt\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Matt\AppData\Local\Temp\pip-install-l0j0afpg\ujson_7ec301c0567b44aab36a8e2e995eace9\setup.py'"'"'; file='"'"'C:\Users\Matt\AppData\Local\Temp\pip-install-l0j0afpg\ujson_7ec301c0567b44aab36a8e2e995eace9\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Matt\AppData\Local\Temp\pip-record-eobpo6yh\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\matt\appdata\local\programs\python\python39\Include\ujson' Check the logs for full command output.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.