A fast and lightweight solution to finding synonyms for words, built as a category on NSString.
Objective-C
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
NSString+RNSynonyms.h
NSString+RNSynonyms.m
README.md

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.