yn 0.1.1

Natural language processing library for yes or no values
Documentation
  • Coverage
  • 100%
    7 out of 7 items documented7 out of 7 items with examples
  • Size
  • Source code size: 13.63 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.32 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • holbewoner/yn.rs
    15 2 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • TheUnitedStatesOfAmerica

ci-badge docs-badge

yn

Want to check if a value is yes, no, maybe both? Maybe you want to check if a value is somewhat yes? Somewhat no?

We've got you covered! This is state of the art.. EHEM.. Natural language processing. With yn, you will be the one who can safely say NO!

Examples

If you want to use this very advanced natural language processing technology you simply need to do the following:

To check if something is yes:

extern crate yn;

assert!(yn::yes("yes")); // this is yes, you can be 100% sure

If you don't have time to write yes:

extern crate yn;

assert!(yn::yes("y")); // this is also yes

If you're a bleepity blooping machine:

extern crate yn;

assert!(yn::yes("1"));

Of course, this is not yes:

extern crate yn;

assert!(!yn::yes("no"));

You can also check if something is somewhat yes:

extern crate yn;

assert!(yn::is_somewhat_yes("this has a y so it is the word"));

Or if you want to check if something just contains y:

extern crate yn;

assert!(yn::is_kinda_yes("very much so"));

Same goes for no.
The options are endless. Your imagination is the limit.

License

Licensed under MIT