Giter Club home page Giter Club logo

citylex's People

Contributors

dependabot[bot] avatar kylebgorman avatar

Stargazers

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

Watchers

 avatar  avatar

citylex's Issues

Error downloading SUBTLEX data

Hi! I recently tried to execute the code citylex --all-free from a Google Colab notebook and I got the following error:

INFO: Requesting URL: http://crr.ugent.be/papers/SUBTLEX-UK.xlsx
Traceback (most recent call last):
  File "/usr/local/bin/citylex", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/dist-packages/citylex.py", line 502, in main
    _subtlex_uk(lexicon)
  File "/usr/local/lib/python3.7/dist-packages/citylex.py", line 248, in _subtlex_uk
    ptr.subtlex_uk_freq = freq
TypeError: '' has type str, but expected one of: int, long

I have a feeling this is because something is corrupted in the frequency column of the SUBTLEX-UK data but I do not really know. Just thought you'd like to know that this error is out there.

ETA: If I run citylex --elp --cmudict everything works just fine and it saves a tsv of all of the stats.

Different ways to translating frequency norms

In addition to raw frequencies we should report van Heuven et al.'s "Zipfs". Ignoring the Laplace smoothing they talk about, the equation seems to be:

import math


def zipfs(count: int, total: int) -> float:
    # Subtraction in log-space is division in real-space.
    scale = math.log10(count) - math.log10(total)
    return scale + 9

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.