Autocomplete REST API, looking for Shanghai, Beijing - autocomplete
I've got wrong responses when looking for Shanghai or Beijing. See my tests below. With other capitals it works fine: Berlin, Tokyo, Moscow. Also, if I look in wego.here.com I get the right response.
Could you help?
Thank you,
Sorin
http://autocomplete.geocoder.cit.api.here.com/6.2/suggest.json?app_id=&country=&query=Beijing
Shanghai, Beijing wrong, no matchLevel:state, no matchLevelCity
{"suggestions":[{"label":"Philippines, Calamba, Beijing","language":"en","countryCode":"PHL","locationId":"NT_oqMNKjEk.to1mdjm1gqqPA","address":{"country":"Philippines","state":"Calabarzon","county":"Laguna","city":"Calamba","district":"Punta","street":"Beijing","postalCode":"4027"},"matchLevel":"street"},{"label":"Namibia, Khomasdal North, Beijing St","language":"en","countryCode":"NAM","locationId":"NT_Qm6w1xeYD4hjpEhSnRneMD","address":{"country":"Namibia","state":"Khomas","county":"Windhoek","city":"Khomasdal North","street":"Beijing St"},"matchLevel":"street"},{"label":"Kenya, Machakos, Beijing Rd","language":"en","countryCode":"KEN","locationId":"NT_7VHT8XcIyTZGeBjQbS8gLD","address":{"country":"Kenya","county":"Machakos","city":"Machakos","district":"Mlolongo","street":"Beijing Rd"},"matchLevel":"street"},{"label":"Philippines, Mabalacat, Beijing","language":"en","countryCode":"PHL","locationId":"NT_PxBKm2mHErRett02lDJMtD","address":{"country":"Philippines","state":"Central Luzon","county":"Pampanga","city":"Mabalacat","district":"Macapagal Village","street":"Beijing","postalCode":"2010"},"matchLevel":"street"},{"label":"Philippines, Dasmariñas, Beijing","language":"en","countryCode":"PHL","locationId":"NT_DQA9lrPzLnQFHFOuF1AzuD","address":{"country":"Philippines","state":"Calabarzon","county":"Cavite","city":"Dasmariñas","district":"Paliparan III","street":"Beijing","postalCode":"4114"},"matchLevel":"street"}]}
Test on:
wego.here.com
Berlin: corect
{"suggestions":[{"label":"Deutschland, Frankfurt am Main, Berliner Straße","language":"de","countryCode":"DEU","locationId":"NT_OV3A4F7PVZMW36XQixpFiB","address":{"country":"Deutschland","state":"Hessen","county":"Frankfurt am Main","city":"Frankfurt am Main","district":"Altstadt","street":"Berliner Straße","postalCode":"60311"},"matchLevel":"street"},{"label":"Deutschland, Berlin, Berlin, Berlin","language":"de","countryCode":"DEU","locationId":"NT_DKX2wfaWICS7JyfHmCOJhB","address":{"country":"Deutschland","state":"Berlin","county":"Berlin","city":"Berlin","postalCode":"10117"},"matchLevel":"city"},{"label":"Deutschland, Berlin, Berlin","language":"de","countryCode":"DEU","locationId":"NT_MA6xiXs5hGsq-tRm65Wf-A","address":{"country":"Deutschland","state":"Berlin","county":"Berlin"},"matchLevel":"county"},{"label":"Deutschland, Berlin","language":"de","countryCode":"DEU","locationId":"NT_yGnW7rZT3HnFM0EL.MXf8D","address":{"country":"Deutschland","state":"Berlin"},"matchLevel":"state"},{"label":"Sverige, Torsåker, Berlins väg","language":"sv","countryCode":"SWE","locationId":"NT_6X3gCwjX1ksmmBqNs4kezC","address":{"country":"Sverige","state":"Gävleborgs län","county":"Hofors","city":"Torsåker","street":"Berlins väg","postalCode":"813 40"},"matchLevel":"street"}]}
Tokyo corect:
{"suggestions":[{"label":"Japan, Tokyo","language":"en","countryCode":"JPN","locationId":"NT_oRZz9aPaSYfbouvvHbUGpA","address":{"country":"Japan","county":"Japan","city":"Tokyo"},"matchLevel":"city"},{"label":"Philippines, Imus, Tokyo St","language":"en","countryCode":"PHL","locationId":"NT_NAxCJnorfvgKjS8ZsXcdhD","address":{"country":"Philippines","state":"Calabarzon","county":"Cavite","city":"Imus","district":"Malagasang II-G","street":"Tokyo St","postalCode":"4103"},"matchLevel":"street"},{"label":"Philippines, Binangonan, Tokyo","language":"en","countryCode":"PHL","locationId":"NT_ZnBPiug1PQcQ--saSfcdvB","address":{"country":"Philippines","state":"Calabarzon","county":"Rizal","city":"Binangonan","district":"Tayuman","street":"Tokyo","postalCode":"1940"},"matchLevel":"street"},{"label":"Argentina, Hurlingham, Tokyo","language":"es","countryCode":"ARG","locationId":"NT_m8XDPlatLYzVnvzuOHVEQD","address":{"country":"Argentina","state":"Buenos Aires","county":"Hurlingham","city":"Hurlingham","street":"Tokyo","postalCode":"1686"},"matchLevel":"street"},{"label":"Nederland, IJsselstein, Tokyostraat","language":"nl","countryCode":"NLD","locationId":"NT_G.9gnZd1wDFJgrhzyPW0rC","address":{"country":"Nederland","state":"Utrecht","county":"IJsselstein","city":"IJsselstein","street":"Tokyostraat","postalCode":"3404 DW"},"matchLevel":"street"}]
Detailed China map supported only for requests inside China.
Detailed information about coverage can be found by link https://developer.here.com/rest-apis/documentation/geocoder/topics/coverage-geocoder.html
Related
Can anyone get any data back for UK from Alpha Vantage?
Can anyone get data back from London using the Alpha Vantage API? https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=LON:SSE.L&apikey=mykeyhere The endpoint returns information for US listed companies, but when you try to switch to UK or anywhere else you get {}. I've tried encoding the dot as %2e and adding a " - " as described by a user here but still nothing. I've also tried changing the exchange code between XLON and LON. This had no effect. Has anybody had a similar experience or have a working call?
Yes, as of today the query you have written above works for me with a free API key. It produces a JSON object with the key "Global Quote", containing another object with 10 entries ("01. symbol", "02. open", "03. high", "04. low", "05. price", "06. volume", "07. latest trading day", "08. previous close", "09. change" and "10. change percent").
iab.taxonome.org error code -5
i'm trying to use iab.taxonome.org service to classify texts, and get error response -5 (text too short) Here is what i'm sending to the service: https://rest.taxonome.org/v1/taxono?me=A college basketball game at Allen Fieldhouse, in Lawrence, Kansas, the home of the Kansas Jayhawks The history of basketball is traced back to a YMCA International Training School, known today as Springfield College, located in Springfield, Massachusetts&token=[...MyKey...]&ver=1
Indeed I had the same issue. After clearing this with taxonome support team I figure out there is a requirement for at least 500 words per classification. I have asked to add it to the API reference page. Double checking and editing my answer: It is depends which framework is being used to send this data. In case you are implementing the client and not encoding the URL string it won't work for you (e.g. space = %20). Check the API example here: https://iab.taxonome.org/api
Extract a person's full name from a block of text in Perl?
I need to extract names (including uncommon names) from blocks of text using Perl. I've looked into this module for extracting names, but it only has the top 1000 popular names and surnames in the US dating back to 1990; I need something a bit more comprehensive. I've considered using the Social Security Index to make a database for comparison, but this seems very tedious and processing intensive. Is there a way to pull names from Perl using another method? Example of text to parse: LADNIER Louis Anthony Ladnier, [Louie] age 48, of Mobile, Alabama died at home Friday, November 16, 2012. Louie was born January 9, 1964 in Mobile, Alabama. He was the son of John E. Ladnier, Sr. and Gloria Bosarge Ladnier. He was a graduate of McGill-Toolen High School and attended University of South Alabama. He was employed up until his medical retirement as Communi-cations Supervisor with the Bayou La Batre Police Department. He is preceded in death by his father, John. Survived by his mother, Gloria, nephews, Dominic Ladnier and Christian Rubio, whom he loved and help raise as his own sons, sisters, Marj Ladnier and Morgan Gordy [Julian], and brother Eddie Ladnier [Cindy], and nephews, Jamie, Joey, Eddie, Will, Ben and nieces, Anna and Elisabeth. Memorial service will be held at St. Dominic's Catholic Church in Mobile on Wednesday at 1pm. Serenity Funeral Home is in charge of arrangements. In lieu of flowers, memorials may be sent to St. Dominic School, 4160 Burma Road Mobile, AL 36693, education fund for Christian Rubio and McGill-Toolen High School, 1501 Old Shell Road Mobile, AL 36604, education Fund for Dominic Ladnier. The family is grateful for all the prayers and support during this time. Louie was a rock and a joy to us all.
Use Stanford's NER (GPL). Demo: http://nlp.stanford.edu:8080/ner/process
There is no sure fire way to do this due to the nature of the English language. You either need lists to (fuzzy)compare with, or will have to settle for significant accuracy penalties.
The Apache Foundation has a few projects that cover the topic of entity extraction with specific pre-trained models for English names (nameFinder). I would recommend openLNP or Stanbol. In the meantime if you have just a few queries I have an NLP I've implemented in C# in my apps section at http://www.augmentedintel.com/apps/csharpnlp/extract-names-from-text.aspx. Best, Don
You're trying to implement a named-entity recognition. The bad news is that it's really hard. You could try Lingua::EN::NamedEntity, however: $ perl -MLingua::EN::NamedEntity -nE 'say $_ for map { $_->{class} eq "person" ? $_->{entity} : () } extract_entities($_)' names.txt Louie Louis Anthony Ladnier Louie John E Bayou La Batre Police Department Gloria Julian Cindy Eddie Ladnier Eddie John Catholic Church Christian Rubio Dominic Ladnier Burma Road Mobile Louie You can also use Calais, a Reuters webservice for natural language processing, which offers a lot better results:
I think you want to Google something like: perl part of speech tagging
Open graph : count actions by object
I'm new to the facebook open graph. I would like to know how many times an action is performed over a given object. eg : Bob cooks chocolate cake Sam cooks orange cake Peter cooks chocolate cake I would to query how many people have cooked "chocolate cake" to get 2 as a result. Thanks !
Parsing an Address with T-SQL
I am trying to figure out how to parse an address using T-SQL and I suck at T-SQL. My challenge is this, I have a table called Locations defined as follows: - City [varchar(100)] - State [char(2)] - PostalCode [char(5)] My UI has a text box in which a user can enter an address in. This address could be in the form of essentially anything (yuck, I know). Unfortunately, I cannot change this UI either. Anyways, the value of the text box is passed into the stored procedure that is responsible for parsing the address. I need to take what the person enters and get the PostalCode from the Locations table associated with their input. For the life of me, I cannot figure out how to do this. There are so many cases. For instance, the user could enter one of the following: Chicago, IL Chicago, IL 60601 Chicago, IL, 60601 Chicago, IL 60601 USA Chicago, IL, 60601 USA Chicago IL 60601 USA New York NY 10001 USA New York, NY 10001, USA You get the idea. There are a lot of cases. I can't find any parsers online either. I must not be looking correctly. Can someone please point me to a parser online or explain how to do this? I'm willing to pay for a solution to this problem, but I can't find anything, I'm shocked.
Perhaps a CLR function might be a better choice than tsql. Check out http://msdn.microsoft.com/en-us/magazine/cc163473.aspx for an example of using regular expressions to parse some pretty complex string inputs into table value results. Now you get to be as creative as you please with your regex matching but the following regex should get you started: (.*?)([A-Z]{2}),? (\d+)( USA)?$ If you're reluctant to use CLR functions, perhaps you have regex functionality in the calling system, like ASP.Net or PHP.