Is it possible to obtain labels from ML Kit Image Labeling in a given language?
I easily manage to get them in english...
but I need different languages... any suggestion?
In the docs I found this
In addition the text description of each label that ML Kit returns, it also returns the label's Google Knowledge Graph entity ID. This ID is a string that uniquely identifies the entity represented by the label, and is the same ID used by the Knowledge Graph Search API. You can use this string to identify an entity across languages, and independently of the formatting of the text description.
Maybe it is possible to use a graph entity id to translate the label?
Or what else can I do?
As the Firebase support told me via mail the day Feb 1, 2019
Unfortunately at the moment it is not possible to use other languages for image labeling, however I have created a feature request for our engineering team to take a look at and consider for future releases. There's no telling on when this will be ready, but you can keep an eye on the Firebase Release Notes to be informed of the latest from Firebase.
On the other hand the Knowledge Graph entity ID can be used to find entities in the Google Knowledge Graph but at the moment it is not possible to connect these results with the image labeling in order to translate the label.
I firstly tryed to play with the Graph entity ID, in order to traslate the label description... but since i used the in-device Firebase library, i obtained some ID that Knowledge Graph wasn't able to recognize (for instance: Label: Flower, Confidence: 0.97793585, EntityID: /m/0c9ph5).
I ended up using a free translation API sevices (Yandex) wich is free for the first million translated character a day.
Related
I wonder if there is a list of the possible labels returned by google's object localization: 'human', 'dog', 'cat', etc.
Knowing all possible labels returned by the object localization service of Google, can help us use the service more efficiently. For example, if we are looking in our database for images with hats, we first send our images to the api, then we need to know all possible labels related to hat that google returned. Looking for the word "hat" in the labels will miss those images in which google object recognition returned "sombrero".
There is no extensive list available which has all the possible labels used in Google object localization. If you feel that list would be highly beneficial you may post a feature request in Google's issuetracker.
In any case, notice that Google object localization results contain a machine-generated identifier (MID) corresponding to a label's Google Knowledge Graph entry. Therefore, you may perform calls to the GKG API to check similar possible results.
For example, if you perform the call for Sombrero
https://kgsearch.googleapis.com/v1/entities:search?query=sombrero&key=<yourAPIKey>&limit=5&indent=True
you will obtain the results: Sombrero, Hat, Sun Hat, Sombrero Galaxy, Straw Hat.
I want business description using google API or wikidata API.
As shown in above image I want to access description (which is highlighted in red circle.) and store it into application database.
What I tried till now, I used google place API to get the place information, using that I am able to get information like review,rating,opening hours. But I am not able to get that information which I have mention in above image. But I do not know how to get that information using Wikidata api or Google Knowledge Graph api.
Can any one suggest me that how can I use that API to get that information.
Any help would be highly appreciated !
Thanks,
I'd also be keen to know if this is possible. For example, with a bounding box. 4 coordinates, might it be possible for Google Knowledge or another API to give me a summing up of the place.
For example: bbox=4.721375,52.290843,5.070190,52.399905
Might return information and history on the city of Amsterdam. Like when you type into Google Search "Amsterdam".
Just a thought. I have previously accomplished this with a very manual combination of Overpass API (related to OSM) and Freebase.
I just found this: Find a place description in Freebase using latitude and longitude?
So, it can be done. And it is already documented.
I've been looking into this for quite a bit, but couldn't find a solution. Is there a way to find out whether railway tracks are near a users position?
The APIs don't provide a places search like this (see Google Places supported types for this). One possibility would be to download the OpenStreetMap dataset for your region, import it in a database and extract the datasets Railways. Then you could pass the users position to your database (PostGIS) and check if there is a railways matching your filters.
Moreover there is the OpenRailwayMap, if you just need a possibility to do some visual identification of railway tracks. See OpenRailwayMap API site for further usage information.
I am trying to automatically populate a field through a calculated field.
Just a quick background we distribute equipment with serials numbers. This equipment is sometimes returned. So some customers have multiple products each with different status of returned, shipped and installed.
I would like to transfer this serial number to a field on the contact through a calculated field only if the status is installed or shipped.
I have tried:
related($products,"serial"),",",(related($products,"status"))
and
related(contains(status,"installed)"products,"serial")
I need this for reporting reasons and would be greatly appreciated if you could help.
Thanks
You need a combination of ifElse and equal and related and or
As an example, the following Sugar Logic formula can be placed on a Contact record and will populate the field with the related account's name if the related account is of the type "Reseller." If the Account is of some other account_type then the field takes the value of "nope!"
ifElse(equal(related($accounts,"account_type"),"Reseller"),related($accounts,"name"),"nope!")
If you wanted to add another condition, or allow for another acceptable Account Type, build in an or
When you're writing lengthy Sugar Logic like this, I find it helpful to start writing it out with indentation using a text editor:
ifElse(
or(
equal(related($accounts,"account_type"),"Reseller"),
equal(related($accounts,"account_type"),"Investor"),
),
related($accounts,"name"),
"nope!"
)
In some versions of Sugar I've had to remove the extra spacing but it seems like in 7.2.2.0 at least the editor actually allows and preservers the formatting, which is a pleasant surprise.
We'd like a sort of overview report regarding our petitions in CiviCRM. It would be great to have two pie charts, one showing contacted and signed % and contacted but not signed %, and another pie chart showing the results of our one-question poll (Yes, No, Maybe).
Ideally the charting would be integrated into CiviCRM so we don't need to do custom code to get charts every time we run a poll.
I can't find anything to do this on the CiviCRM forums and my question there is unanswered.
Would this be better done in Drupal Webforms?
This is probably a job for a custom report template. The issue is that you're not just looking at petition signature activities; you're comparing that against being "contacted". CiviCRM won't know off the bat what you mean by that. Is it receiving an email? Having a phone call activity? Having any activity in X campaign?
The custom report template would need to extend the activity report to include contacts who are involved in two activities: being "contacted" and signing the petition. Really, it's not a report of petition signatures--many won't have signed anything--it's a report of being "contacted", so you'll need to be able to filter out what that is (and distinguish these activities from being contacted with a different ask).
You'll need to have the report template make joins from the "contacted" activity to the civicrm_activity_contact table, then to the same table (to find other activities the same contact is involved with), then to the civicrm_activity table again to get the petition signatures. Once you have the basics working there, you can add in columns and filters, and after that, you can give the report a pie chart display.
Once you have all this set up (and it is a bit significant--my shop would charge for 5-10 hours of work), you could use the regular interface to pick which petition and what criteria should be used for identifying those being "contacted". You could have a bunch of saved report instances for that single template, so you wouldn't need to write any new code unless a CiviCRM upgrade interfered with things.
Here's the reference for how to create custom report templates:
http://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Report-Template+Extension