Showing posts with label Search. Show all posts
Showing posts with label Search. Show all posts

Sunday, 19 June 2011

geo search 2.0: Data In, Data Out




Last week during the geo madness of Where2.0 and WhereCamp, we announced two enhancements in geo search to make it both easier for developers to get their data into our geo search index and easier for developers to get data back out of the index:



  • Geo Sitemaps: Sitemaps are a protocol that bots use to index content from websites. Last year, we announced the ability to include KML/GeoRSS files in regular sitemaps just like a normal web resource. This year, we announce a special extension for sitemaps that adds geo-specific tags and makes it easier for us to index. To get your geo content indexed as fast as possible, just submit the sitemap to Google Webmaster Central. For more information on creating a KML file to include in a sitemap, read this article in the KML documentation. An example geo sitemap listing a KML and a GeoRSS file is shown below:



  • xmlns:geo="http://www.google.com/geo/schemas/sitemap/1.0">

    http://www.example.com/download?format=kml

    kml



    http://www.example.com/download?format=georss

    georss




  • Geo search in the API: The Local Search API has traditionally been used to return business listings and address geocodes. As of last week, it can now be used to retrieve any of the content we have in our geo index. There are a couple different ways to do this, depending on how you use the API. If you're using the LocalSearchControl, here's some sample code (and live example) that will return blended results:


  • var options = {
    listingTypes : GlocalSearch.TYPE_BLENDED_RESULTS
    }
    map.addControl(new google.maps.LocalSearch(options));


    If you're using the Local Search API from Javascript, here's some sample code to return only results from indexed geo files:

    var ls = new GlocalSearch();
    ls.setRestriction(GSearch.RESTRICT_TYPE, GlocalSearch.TYPE_KMLONLY_RESULTS);


    And finally, if you're using the Local Search API from somewhere other than Javascript - for example, with our new nifty Maps API for Flash - here's some sample AS3 code (and live example) to return only results from indexed geo files PLUS add a site restrict operator to limit it to results from platial.com:


    service.url = 'http://ajax.googleapis.com/ajax/services/search/local';
    service.request.q = "site: platial.com" + " " + address.text;
    service.request.mrt = "kmlonly";
    service.addEventListener(ResultEvent.RESULT, onServerResponse);
    service.send();





There are (atleast) two really cool consequences of this news: 1) you'll be able to enable users of your mashups to instantly find international results where previously none existed, and to be able to find results for non-standard searches (e.g. "dog parks"), and 2) by indexing your content, waiting a few weeks, and then using the local search with a "site:yourdomain.com" appended to the query, you get to leverage the power of google search on your own content with barely any code of your own.



So what are you waiting for? Give us your geo sitemap, use our API calls, and let us know what you think in the Maps API, KML, or AJAX API forums.




Generated by BlogIt

BlogIt - Auto Blogging Software for YOU!

BlogIt - autoblogging software for YOU

BlogIt - autoblogging software for YOU

App Engine, Local Search, & Maps: Making Static Maps... Interactive?



JavaScript and Flash are great for putting Google Maps on your website, but sometimes they just won't do. For mobile browsers or users with dial-up connections, simpler is better. So I wrote an open source non-JavaScript version of Google Maps which is designed to show how easy it is to write an application on App Engine that makes use of two new APIs from Google: The Static Maps API and the Local Search API's REST interface. It doesn't have advanced features like street view and public transportation, but it gives you a searchable map that you can zoom in/out on as well as save locations. It also automatically saves your last map view so that every time you go back to the site it will show you what you were last looking at. Check out the source code.



It uses App Engine to store saved points, the AJAX LocalSearch REST API for search functionality, and the Static Maps API to display maps. App Engine is easy to learn and the data store is useful for this kind of application. The REST API for LocalSearch is also very simple. For more information on it, go here.



To use the Static Maps API, you just need to create a URL with the proper parameters for your desired map view. Keep in mind that you need to set the zoom level (unless you are specifying multiple points — then it's calculated for you). In the vast majority of cases, this is completely fine. In my case, though, I needed to know what the zoom level was, so that I could give the user the option to zoom in/out. That meant coming up with calculations of the zoom both for the multiple points and single point case, and that was the trickiest part of the app.



If you use the AJAX Local Search and it returns one result then there will be a viewport object returned with it. This viewport contains the Northeast and Southwest latitude/longitude bounds that are optimal for displaying this point. However, Static Maps only accept zoom levels and center points. Here's the Python to generate that information:

viewport = json['responseData']['viewport']
mercator_projection = MercatorProjection(18) # Checkout the MercatorProjection class
southwest = [float(viewport['sw']['lat']),float(viewport['sw']['lng'])]
northeast = [float(viewport['ne']['lat']),float(viewport['ne']['lng'])]
bounds = [southwest, northeast]
zoom_level = mercator_projection.CalculateBoundsZoomLevel(bounds, MAP_SIZE)
At this point you will have everything you need to construct the map: the center point (the Local Search point), zoom level, marker point.



Then there's the case where you have multiple points returned by the AJAX Local Search. Since we will have a collection of latitudes and longitude points that we want to display we can just find the min/maxes, do some rounding, and voilà you get a bounding box. With a bounding box and a calculated center point, you can repeat the same steps as before.

mercator_projection = MercatorProjection(18)
bounds = CalcBoundsFromPoints(lats, lngs)
center_point = CalcCenterFromBounds(bounds)
zoom_level = mercator_projection.CalculateBoundsZoomLevel(bounds, MAP_SIZE)



From line 121 to about 285 you'll find all the necessary functions for the situations described above. Try using this code to create your own interactive version of Static Maps, and let us know in the forum if you have questions or just want to show off your nifty app.




Generated by BlogIt

BlogIt - Auto Blogging Software for YOU!

BlogIt - autoblogging software for YOU

BlogIt - autoblogging software for YOU

Word of Mouth: Introducing Voice Search for Indonesian, Malaysian and Latin American Spanish

(Read more about the launch of Voice Search in Latin American Spanish on the Google América Latina blog)

Today we are excited to announce the launch of Voice Search in Indonesian, Malaysian, and Latin American Spanish, making Voice Search available in over two dozen languages and accents since our first launch in November 2008. This accomplishment could not have been possible without the help of local users in the region - really, we couldn’t have done it without them. Let me explain:

In 2010 we launched Voice Search in Dutch, the first language where we used the “word of mouth” project, a crowd-sourcing effort to collect the most accurate voice data possible.The traditional method of acquiring voice samples is to license the data from companies who specialize in the distribution of speech and text databases. However, from day one we knew that to build the most accurate Voice Search acoustic models possible, the best data would come from the people who would use Voice Search once it launched - our users.

Since then, in each country, we found small groups of people who were avid fans of Google products and were part of a large social network, either in local communities or on online. We gave them phones and asked them to get voice samples from their friends and family. Everyone was required to sign a consent form and all voice samples were anonymized. When possible, they also helped to test early versions of Voice Search as the product got closer to launch.

Building a speech recognizer is not just limited to localizing the user interface. We require thousands of hours of raw data to capture regional accents and idiomatic speech in all sorts of recording environments to mimic daily life use cases. For instance, when developing Voice Search for Latin American Spanish, we paid particular attention to Mexican and Argentinean Spanish. These two accents are more different from one another than any other pair of widely-used accents in all of South and Central America. Samples collected in these countries were very important bookends for building a version of Voice Search that would work across the whole of Latin America. We also chose key countries such as Peru, Chile, Costa Rica, Panama and Colombia to bridge the divergent accent varieties.

As an International Program Manager at Google, I have been fortunate enough to travel around the world and meet many of our local Google users. They often have great suggestions for the products that they love, and word of mouth was created with the vision that our users could participate in developing the product. These Voice Search launches would not have been possible without the help of our users, and we’re excited to be able to work together on the product development with the people who will ultimately use our products.




Generated by BlogIt

BlogIt - Auto Blogging Software for YOU!

BlogIt - autoblogging software for YOU

BlogIt - autoblogging software for YOU

Friday, 17 June 2011

Google Announces Instant Pages for Instant Search Results

Google has announced Instant Pages at its Inside Search event in San Francisco, a feature technology of instant that delivers results for searches instantaneously. In the demonstration, Google showed that a search result could take 3-5 seconds to appear on a local machine, but with Instant Pages the result is delivered with in 1 second. I can’t belive it, but its true!!


google instant pages 1 Google Announces Instant Pages for Instant Search Results


Google’s Amit Singhal said ” Google Instant namely that it was now available in 32 languages and over 62 domains. The Instant Search feature is also now available on Google “Image Search,” working by changing the images as you enter search.” We call speed the killer app. None of us have enough time, and last year’s Google Instant was one of the biggest improvements we’ve made in getting information to users quicker.”


A new image search feature will also invite users to upload, drag and drop, paste a URL or use a browser extension to provide a reference to an image. Google will then identify the image by comparing it to its database and publishing the subject, location and details.


Google “Instant Pages” will be available on Chrome Beta in the next week and is available in the developer version of Chrome today.  Singal also said that Pages and Instant combined will save people 8-10 seconds of search work.


Here’s video of Instant Pages. Check it now







Google Announces Instant Pages for Instant Search Results is a post from: CyberVally | Addicted to Technology






Generated by BlogIt

BlogIt - Auto Blogging Software for YOU!

BlogIt - autoblogging software for YOU

BlogIt - autoblogging software for YOU