2 releases

Uses old Rust 2015

0.1.1 Jun 24, 2018
0.1.0 Jun 24, 2018

#2222 in Algorithms

Download history 319/week @ 2024-07-19 344/week @ 2024-07-26 294/week @ 2024-08-02 332/week @ 2024-08-09 423/week @ 2024-08-16 481/week @ 2024-08-23 548/week @ 2024-08-30 489/week @ 2024-09-06 362/week @ 2024-09-13 305/week @ 2024-09-20 351/week @ 2024-09-27 429/week @ 2024-10-04 345/week @ 2024-10-11 350/week @ 2024-10-18 294/week @ 2024-10-25 437/week @ 2024-11-01

1,501 downloads per month
Used in rsnltk

MIT license

10KB

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

No runtime deps