Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to see different forms of a word through the Word API?

I'm wondering if it's possible to see a different form of a word through the Word API. I am in the process of making an Open Source tool that automatically adds documentation to properties and methods when saving the document. It'll only do it to methods that are public or protected.

The way I want it to work is that if you follow a specific naming convention and use (for instance) the method name AddPerson or add_person, the code takes these method names and converts them into an array of words. "Add" and "Person".

From these words, I would like to detect if it's a verb or a noun. For instance, in this example, "Add" is a verb and "Person" is a noun.

Once this has been detected, I would furthermore like to transform the words, to form the following documentation statement:

AddPerson(Person person)

Adds a person.

person: The person.

I hope you understand.

So in short, how can I convert "Add" into "Adds" in a smart way, and how can I detect if "Add" is a verb or a noun programmatically?

I assumed the Word API would be a good start. I just have no idea how.

like image 502
Mathias Lykkegaard Lorenzen Avatar asked Apr 20 '12 16:04

Mathias Lykkegaard Lorenzen


People also ask

Does Wordle have an API?

Then this new, actively updated, API is a must. In a typical Wordle game, you'll need to generate new words, and also check a person's guess to see if it's a real dictionary word. That is where this API comes in, with endpoints for both. You won't need another API.

What tool allows you to look up information about a word?

Find more information about a word or phrase Need more information about a word or phrase? Type it in the Search box and select See more search results for... to launch the Search pane. Here you'll find tabs for Knowledge, Files, Web, and Pictures. Note: The Search pane is currently only available in Word.

What is words API?

2. Words API. The WordsAPI is a RESTful API that allows a user to query a database of definitions for over 150,000 words in the English language. The API can also respond with specific details for a word, including part of speech, derivative form, antonyms, synonyms, and other morphological word-specific information.

What is Datamuse API?

The Datamuse API is a word-finding query engine for developers. You can use it in your apps to find words that match a given set of constraints and that are likely in a given context. You can specify a wide variety of constraints on meaning, spelling, sound, and vocabulary in your queries, in any combination.


1 Answers

I ended up using a System.Data.Entity.Design.PluralizationServices.PluralizationService from the Entity Framework which does the job perfectly fine.

The project can be found here:

http://todoc.codeplex.com/

Still working on it though.

like image 59
Mathias Lykkegaard Lorenzen Avatar answered Sep 20 '22 14:09

Mathias Lykkegaard Lorenzen