Code Monkey home page Code Monkey logo

Comments (4)

hugoabonizio avatar hugoabonizio commented on July 23, 2024

The #flesh method is defined as:

https://github.com/watzon/cadmium/blob/589fcf60b24280ff0b6666ba9df54f212ebca9b0/src/cadmium/readability.cr#L92-L94

Thus, depending on the variables (e.g. 6 words, 15 syllables and 1 sentence), the result would be -10.754999999999995. You can read more about this here.

from cadmium.

rmarronnier avatar rmarronnier commented on July 23, 2024

Thanks @hugoabonizio for the siteimprove you linked to !

So that's the developer's responsibility to "clean up" the scores he gets. Ok.

@watzon : Would you be interested in PRs implementing other readability tests listed here ?
Examples :

  • Automated Readability Index (ARI)
  • Coleman-Liau
  • LIX
  • SMOG

?

from cadmium.

watzon avatar watzon commented on July 23, 2024

Hmm, we should probably cap the score at 0 and make sure it doesn't go lower. I would definitely be interested in a PR for other types of readability scores as well @rmarronnier

from cadmium.

rmarronnier avatar rmarronnier commented on July 23, 2024

I'll let you decide about capping scores. But FYI, I used the cadmium flesch test on 2000+ GPT generated texts. And the lowest ones got around -600 (less than a dozens) (some Eminem-like lyrics without punctuation). The "garbled" ones (random succession of special characters) got -Nan.
So a cap at -1000 or -2000 should be pretty safe IMO.

ok, one PR per test, let's roll ! ;-)

from cadmium.

Related Issues (18)

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.