Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

README.md

NSString+RNSynonyms

A fast and lightweight solution to finding synonyms for words, built as a category on NSString.

Installation

Drag and drop the .h/.m files for NSString+RNSynonyms into your project. I'll setup a podspec if someone opens an issue for it.

API Key

Grab an API key from Big Huge Labs here. Explore the docs, send me some pull requests!

Usage

To find all possible synonyms for a word.

NSString *word = @"developer";
[word findSynonymsWithCompletion:^(NSArray *words, NSError *error) {
    // "creator","photographic equipment"
}];

To find all possible synonyms for a word based on its usage. Usages can be either

  • noun
  • verb
  • adjective
  • adverb
NSString *word = @"phone";
[word findSynonymsWithUsage:@"verb" completion:^(NSArray *words, NSError *error) {
    // "call","telephone","call up","ring","telecommunicate"
}];

To find all possible synonyms for a word.

NSString *word = @"important";
NSString *sentence = @"The important thing to remember about WWDC is that it is a developer conference.";
[word findSynonymsInContextSentence:sentence completion:^(NSArray *words, NSError *error) {
    // "of import","significant","crucial","authoritative"
}];

Reading

This small project makes use of NSLinguisticsTagger. Check out the docs and for more reading, NSHipster.

Contact

License

Licensed under MIT, see LICENSE.

About

A fast and lightweight solution to finding synonyms for words, built as a category on NSString.

Resources

License

Releases

No releases published
You can’t perform that action at this time.