Parts Of Speech API - Dart/Flutter Client

Parts Of Speech extracts words from text based on grammatical categories like nouns, verbs, and adjectives. Pass any text passage and a category to receive an array of matching words.

pub package License: MIT

This is the Dart/Flutter client for the Parts Of Speech API.

Installation

Add this to your pubspec.yaml:

dependencies:
  apiverve_partsofspeech: ^1.2.6

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage

import 'package:apiverve_partsofspeech/apiverve_partsofspeech.dart';

void main() async {
  final client = PartsofspeechClient('YOUR_API_KEY');

  try {
    final response = await client.execute({
      'text': 'My friend from college hails from a small countryside village located at the heart of the state. During the last summer vacation, I had an opportunity to visit my friend in his village. I packed up my belongings and boarded the bus bound for the village',
      'partofspeech': 'verbs'
    });

    print('Status: ${response.status}');
    print('Data: ${response.data}');
  } catch (e) {
    print('Error: $e');
  }
}

Response

{
  "status": "ok",
  "error": null,
  "data": {
    "partofspeech": "verbs",
    "result": [
      "located",
      "had",
      "visit",
      "packed up",
      "boarded",
      "bound"
    ],
    "count": 6
  }
}

API Reference

Authentication

All requests require an API key. Get yours at apiverve.com.

License

MIT License - see LICENSE for details.


Built with Dart for APIVerve

Libraries

apiverve_partsofspeech
Parts Of Speech API client for Dart/Flutter