I need a simple list of verified existent cities, states (streets and sights if possible, but not necessary). I tried to find some dictionary on the internet, like a plain text file or a web page, but it's hard to make good search query for that.
Or maybe there's a way to get this list from some maps API?
It is indeed hard to make a good search query for that. I just clicked a related questions link and this might help:
http://www.geonames.org/
(copied from an answer on Cities/Province/Cantons list with coords?)
They offer files for donwload and webservices.
Related
I'm new to Azure Cognitive Services, and while I'm pretty sure it can help me solve my problem, I don't quite understand which part of it to use for it...
Here's what I want to do:
We have blog posts, say ~1k, and those blog posts all have categories and tags (multiple each). What I want to do, is to "guess" the right categories/tags for each article based on the content, and then present that to the editor as a suggestions at the time of input ("looks like this article is about: health, well-being, ..."). The ~1k articles we already have in the system are currently correctly tagged/categorized, so I'd like to use these a data source for this "guessing".
I've used Azure Search before, and it seems like some combination of EntityRecognition and KeyPhraseExtraction might be a way in the right direction? Azure Cognitive Services also seems to have an API that supports TextAnalytics that would do something similar. I'm a bit confused about why these are two different things (or are they not?)
This also seems like an entirely common problem (matching text against pre-defined categories based on other text that is categorized), so I'm wondering if I'm just missing an obvious solution here?
Thanks in advance.
I think the Azure Cognitive Text Analytics API is your best bet as you are looking for real-time analysis prior to tagging/categorizing for storage.
Text Analytics could return a list of named entities that you could map to your available tags/categories and present to the user.
Azure Cognitive Search requires an indexer and skillset to process target text with an end result of storing the processed results to an index specifically for searching.
I've been trying my very best not to ask any nosy question here in stackoverflow, but it has been almost one week since I got stuck in this problem and I couldn't find any solution.
I already have my working website built with CakePHP 3.2. What the website basically does is scrape Twitter for tweets containing a given search term, check if it's already in my database, and store it if it doesn't yet exist. Twitter's JSON response has this "tweet_id" property, and I've been using that value to check for whether I should ignore or append a specific tweet to my DB. While this might be okay while my database is small, I suspect it's going to slow things down considerably when my tables grow bigger. Thus my need for ElasticSearch.
My ElasticSearch server is running on my Arch Linux install, and I've configured my app to point to the said server. Also, I have my "Type" object named the same way as my "Tweets" table (I followed the documentation until the overview part http://book.cakephp.org/3.0/en/elasticsearch.html). This craps out an "Unknown method "alias" error, and following Google searches led me to creating an alternate pagination class since that was what some found to be the cause of the error (https://github.com/lorenzo/audit-stash/issues/4), which still doesn't fix things.
I'm not sure if I got this right. I installed the ElasticSearch plugin with the assumption that all I have to do is name the Types the same name as my tables, since to me the documentation "implies" that this should be done on top of the Blog Tutorial they did to "improve query performance".
TLDR, how is this supposed to work? Is my above assumption right? Do I name the Types differently and index everything myself? I'm not sure if there's just too much automagic, or I'm just poor at these sort of things. And yes, I'm new to frameworks (but not PHP, among other languages)
Thanks in advance!
I have some problems still do not understand and I need help.
In some web application like Facebook, when I type a word to find my friends or places, apps..., a suggestion list appear for me. I can traverse and choose one of them.
So I want to ask something:
Best or good tool, language or something like that to do this? I think it's jQuery. More options for me?
Which is a list item in the suggestion list called?
Where did these things from? I means: how can I create or take them? From database directly?
The answers are:
You can use jQuery coupled with a server side language that retrieve the data
Usually it's called suggestion list. These function is Google is called Google suggest
The data are retrieved from the database
I am looking to implement a search function into my system that allows system-wide search that can search through every single model. Is that possible?
I have tried CakeDC Search plugin but it somehow only allows me to search in the particular model that I add the search function into. Also, it seems to be limited to the search fields that I add in the view and I have to keep adding those search fields to enable search for them. What I am looking for is something with just one search box and able to retrieve information from all over the system (eg. Google's basic search with just one search field).
would be great that someone can point me in the right direction or even provide instructions on how to do so as I am fairly new with Cake.
I am using PHPMyAdmin for the database and the latest version of CakePHP. Please do let me know if you need further information as I am not sure what I need to include here.
Thank you.
http://cakedc.com/downloads/view/cakephp_search_plugin
The plugin allows you to attach the behavior to any model you want, and specifiy the table fields that it should take data from to create a search index. (basically when ever you save some data against the model, it runs through all the fields you specify it to look through, creates a data array to save, and saves the search data in its own table, ready to be searched on).
I would suggest giving this a go as it sounds like what you are after. The documentation provies detailed instructions on setting things up.
Hope it helps
Pete
I have an idea for a site that involves uploading files to the site. But what I'd like - and wondering if it's possible - is when a user clicks on "Browse", and selects the file, if it's possible for the site to automatically scan the site's database for similar files before they upload the file to the site. Kind of similar to the automatic "Related Questions" when you act a question on this site.
Sure, that's possible. But you'll have to come up with your own definition, as well as algorithm for finding what's similar.
File Type differences
Different file types should be compared differently. For example a text file would be well suited to a diff to find similar files, but comparing images or videos that are similar is considerably more difficult.
Difficulty of comparisons
Also, comparing against a large number of files is a very expensive thing to do since it's typically done pair-wise. Some indexing methods could help the efficiency of the search though, but I don't see an easy way to do this quickly.
Crowd Source Alternative
Another alternative would be to have the users of the site point out the similarities, that way you simply display a list of the most popular files that were voted similar. Of course, this doesn't help when uploading a new file, but it can help you gain insight as to what users find similar.
What many sites do to compare similarity of content is to allow users to tag items. If one item shares many of the same tags with another, they're likely similar. This is probably the easiest approach.
This also has the benefit that any content type can be compared to any other content type. So text files that have the same tags as a video can be presented as similar.
It's possible to get the file name without uploading the file so you can do the search based on the file name. The content would only be available after the upload.