A Research on Yoda Speak API - bounswe/bounswe2017group7 GitHub Wiki

A Research on Yoda Speak API


What is an API?

To be able to comprehend the Yoda Speak API, one needs to know what an API stands for. API is the abbreviation for Application Programming Interface. “API is a precise specification written by providers of a service that programmers must follow when using that service,” Kevin Stanton says. “It describes what functionality is available, how it must be used and what formats it will accept as input or return as output.”1 More proper definition for it would be that “API is a set of clearly defined methods of communication between various software components.”2 This means that when programs need to communicate with each other, APIs let them do so. In other words, APIs allow you to write applications that use other applications.


## Some Widely Known API Examples

1. Google API

In the past decade, Google has moved far beyond mere search to maps, social networking, email, and more.

2. Facebook API

With the Facebook API, programmers can integrate a more personalized social experience on their own websites, including the ability to “Like” and share pages.

3. Amazon API

You can store your files in Amazon’s data center and manage access using the Amazon API, which has both a REST and SOAP interface.

4. YouTube API

YouTube provides both a YouTube Data API and a YouTube Player API, allowing programmers great flexibility and control over YouTube’s functionality and content.

5. Dropbox API

the Dropbox API grants access to Dropbox data from other business applications for easy revisions, file sharing, search, even restoration of previous file versions. 4


## Who is Yoda?

Yoda

Yoda is a fictional character in the Star Wars universe. Yoda is nine hundred years old and he trained Jedi for over 800 years. Yoda has green skinned with sharp ears. He is small in size but wise and the most powerful master of the Jedi. Also, within the films, he is stronger than most of the Jedi in his connection with the Force. He says philosophical statements by using inverted sentences in object-subject-verb word order. For example; "Death is a natural part of life. Rejoice for those around you who transform into the Force. Mourn them do not. Miss them do not. Attachment leads to jealously. The shadow of greed, that is. "

Yoda Speaks in a Different Syntax

As it’s known from the series, Yoda speaks in a very strange order. The first conversation between Luke and Yoda says it all. When Luke says “I’m looking for someone,” Yoda replies “Looking? Found someone, you have, I would say?” Most-spoken languages in the world are constructed in the same manner: subject, verb and object. But Yoda forms his sentences in a very unusual way: object, subject and verb. Some examples would be “Much to learn, you still have.” or “Lost a planet, Master Obi-Wan has.” Sometimes Yoda also speaks in regular order. This odd-mix makes him kind of unpredictable and more alien-like.

Some Examples

You've already seen the examples of Yoda's syntax from the series. This API allows users to convert any sentence into Yoda's syntax. Yoda Speak API uses the service that is provided by The Yoda-Speak Generator. This generator is free and open to use by users and developers.

Here some examples created by using The Yoda-Speak Generator: First we tried "This is an example for the assignment".

An example for the assignment, this is.

"We may hope that machines will eventually compete with men in all purely intellectual fields."

Eventually compete with men in all purely intellectual fields, we may hope that machines will.

What is Yoda Speak API?

Yoda talks a little different language than formal English. So, Yoda Speak API helps to converting from formal English to Yodish. The service accepts user-submitted text and returns a translation. Output text rephrases jokes, email text, song lyrics, etc. API methods support submission of a text string or passage and return a translated version. This is the link where you can find the Yoda API, https://market.mashape.com/ismaelc/yoda-speak. Here you can see a code snippet that includes necessary http request in Java language:

// These code snippets use an open-source library. http://unirest.io/java

HttpResponse<String> response = Unirest.get("https://yoda.p.mashape.com/yoda?sentence=You+will+learn+how+to+speak+like+me+someday.++Oh+wait.") .header("X-Mashape-Key", "<required>") .header("Accept", "text/plain") .asString();

Some Cases to Avoid (or to Pay Attention)

Using single word sentences doesn’t give any result because there is nothing to change in the structure of sentences. However, long sentences might result to total garbage so there are some cases to pay much attention or to avoid using them. At first, proper punctuation is very important(commas, apostrophes etc.) in order for this API to work. Second point is English grammar, API cannot process the sentence unless it is written with proper grammar. Another point is the rule of dividing the sentence into the clauses, user should use commas after using conjunctions. The last thing that needs to be avoided is parentheses, the API most likely doesn’t work properly with a sentence which contains parentheses.

Where Can We Use Yoda Speak API?

We can use Yoda Speak API to convert any sentence to YODA SPEAK. This includes anything such as jokes, song lyrics, etc. Wouldn't it be nice to have a personal assistant that speaks Yodish? We could choose one of the existing personal assistants like Siri or Cortana, convert their responses using this API and we could have Yoda as our personal assistant! "Set an alarm at 8:30 AM, I have."

What Do People Think About Yoda Speak API?

On the internet, people seem to like this Yoda Speak Api very much. Surely, the vast majority of them are Star Wars fans. Most of the feedbacks are fun. According to the users of Quora, Yoda Speak API is one of the coolest API’s and here are some tweets about this:

  • Piers Batchelor @piersbatch

Try this, you must

  • Rouge Noir T @Jules_Clarke

And that old favourite , Yoda Speech Generator too

  • Viola Supernova ‏@ViolaSupernova

To express yourself like Master Yoda excellent tool for learning how.

What Do We Think About This API?

We think that this API is working better than expected, considering it is just the beta version. It is simple, just takes a string and returns the converted one, so everybody could easily use it. It targets a huge fanbase, and it has a huge potential usage area (it can be used in any app or website that has text content in it). The feedback it got is extremely positive, people are happy with this work. So are we.

References:

1 http://sproutsocial.com/insights/what-is-an-api/
2 https://en.wikipedia.org/wiki/Application_programming_interface
3 https://market.mashape.com/ismaelc/yoda-speak
4 https://webdam.com/blog/top-10-web-apis_bridging-todays-technology/
5 https://www.quora.com/What-are-the-coolest-free-APIs-as-of-January-2015/answer/Benjo-Libor
6 https://twitter.com/ViolaSupernova/status/745632465847521280
7 https://twitter.com/piersbatch/status/807184905402810368
8 https://twitter.com/Jules_Clarke/status/809767638054346752

⚠️ **GitHub.com Fallback** ⚠️