Correcting misunderstandings from Google's Speech2Text service - optimization

I am using Google's Speech2Text API and would like to optimize the results I get, correcting misunderstood words by performing Google searches to find possible phrases within a chosen topic. Is there a service I can use for that?

No, I don't think there is a service like that already in existence. But it wouldn't be too much work to write one.
You're already using Google's API to perform the speech recognition, so presumably you'd be comfortable using it to perform a search for the "chosen topic".
Once you've done that you can take all the answer pages and concatenate them together to make a corpus of phrases that match the chosen topic. From those you can implement an algorithm to find the closest possible substring (try these). You're looking for the substring of that whole corpus that is closest to the speech recognition results you got from Google. That should give you your answer.

Related

Google translate API with alternate translations?

When I use the Google Translate web tool it breaks the translated result into short phrases and offers alternate translations for each phrase. When I read the Translate API Reference it appears that if I use the API I can only get a single translation. I want a lot of alternate translation information. Is there any way I can do this? I am willing to pay for the API, I just need this functionality.
No, in this moment there is no way to get an alternate translation through Google Translation API.

WordNet, Query Expansion, Step by Step

I want to make a project about query expansion using WordNet,but it's hard to find step by step method to do it.
Based on this article, I should take the following steps (assuming a sentence as input to the program):
Tokenization
Tagging part of speech
Stemming word
Word sense disambiguation
Semantic similarity between the two synsets (it still confusing)
...and then we can conclude that the word with larger score is the query expansion from the input. However, I'm still confused about how to perform each of these steps. Is there any source which covers these in more detail?
Query Expansion is a huge field in itself under IR (Information Retrieval).
Also, WordNet is by itself huge, and so it is difficult to find single step-by-step directions.
However, there are tons of very good resources. I got started with it by taking several web examples and trying them out myself.
Resources you will find useful in getting started.
The wordnet site itself (with examples)
The WordNet Wikipedia page
Python Programming.net has a WordNet tutorial page
Even if you don't know Python, I would highly recommend the O'Reilly book "Natural Language Processing with Python". It's website has TONS of examples to get you started.
Hope that helps you get going.

Constructing Intersections from Google Maps API

Problem:
I am trying to reverse geocode a lat/long into a closest street intersection using Google Maps API V3. Also, for now, this doesn't have to be super accurate-- as I am just trying to anonymize an address as opposed to providing directions.
I have seen that the Geocoding Results data contains an Address Component Type of "Intersection", but this doesn't seem to be consistent at all in the return results-- and is more often that not blank.
I have also done some looking on SO for the best way to construct this barring getting it from Google directly, and the closest I have seen is: How can I find the nearest intersection via the Google Maps API?, which doesn't really resolve my issue. In light of this I have come up with my own solution, and would like some opinions, optimizations, constructive criticism, or other options entirely.
My Tentative Solution:
After playing around with the API, I decided to give the following algorithm a shot (just for context, this is written in C# within a console app):
I take an address and resolve that into a lat/long.
I then add or subtract a certain amount of lat or long from the
coordinate-- on the order of a city block (a distance which is adjusted given your
latitude) and get walking directions between the points. I do this for up to all four directions-- so the first modification would be to keep the latitude the same but subtract some longitude. Then the next modification would be to keep the latitude and add some longitude, etc.
After getting the directions, I parse the results and check the start
and end address. If they are different, I pull out the street names
and treat them as an "intersection" (even though sometimes this
results in parallel streets-- again just trying to get a ballpark).
If I don't find two different streets, I widen the distance of the end destination and repeat the process.
So far this working well enough, but obviously it is an expensive process both in terms of time, and in using up my allotted query limit. Also, I checked the API terms of service, and as long as I include their disclaimer and display the results on a Google Map I think that I am ok.
My questions for the community are:
How can I improve the efficiency of the algorithm? Specifically, in
the number of times I call the API (the implementation code is not a
problem)
Is there another way entirely to do this using the Google Maps API?
In the SO question referred to above, the solution was to loop
over building numbers. I am not sure exactly what that means-- so any
clarification would be great.
As referred to above, I do not believe this is breaking the terms of service-- but am I mistaken?
Is there another web-based API to use that may meet my needs better?
Perhaps Bing, or some other provider?
Thanks a lot for any help.
UPDATE:
I have run into my query limit for the day, so I won't be able to test any suggestions against Google today, but I am also still open to using a different API. Thanks.
Old question, but since the original poster stated they were open to solutions other than Google, Geonames has a web API for this for the U.S. See GeoNames WebServices overview and http://www.geonames.org/maps/us-reverse-geocoder.html#findNearestIntersection

Twitter API search within following

wondering if anyone has heard of a way to filter Twitter search results to the users 'following' list? I'd like to do a search for pics that people I follow have posted. The pics part is fairly trivial (search for image URLs) but I'm guessing that a user-filtered search is beyond the API, even with oAuth.
I've seen a couple of services like snapbird.org that advertise this feature (even though they don't seem to work well), any guesses as to how they go about this?
Thanks!
You can implement this specific image search easily with the help of jetwick.com available as open source here: https://github.com/karussell/Jetwick
Currently searching in your friends is possible but adding yet another filter isn't that hard. Patches are welcome ;)

Sampling on Yahoo! Answers

I wonder what is the best way to sample,say, 1000 questions,completely randomly from Yahoo! Answer.
I want to achieve this complete randomness in which I will totally ignore the categories or date of posting etc.
Doing this manually may result in bias,so could anyone give some suggestions here,like using Yahoo! Answer API or sth.
Thanks a lot.
I do not know if it is correct solution from a formal point of view but I would use yahoo boss search to retrieve 4000 questions, and than randomly pick up 1000. Using a search engine let you to retrieve the most important (highly ranked/linked) questions. You can play around with queries for the search engine to get questions of all kinds - most popular and the worst ones... There is also Yahoo Answer API, which provide search functionality but I have not used it so I can not say how good it is.