Is there an equivalent of the old GetTextExtentPoint function for working with the global language fonts that are supported by Azure Cognitive services in a Xamarin Label to calculate the required Label height for the provided text content? E.g. given specific text content translated into various languages at runtime because cultural settings, calculate the number of rows needed to display it by determining the number of line breaks needed given potential word wrap.
Related
First, many thanks to the Scada-LTS team for making this excellent tool available.
I have successfully implemented the functionality of a Scada system by testing two virtual data points (a binary data point representing valve status and a numeric data point representing fluid flow) in a Graphical View panel but in a Synoptic panel populated with elements drawn in Inkscape, I am unable to view data values. I carefully adopted the object ID convention described in the Scada-LTS tutorial video and although graphical objects assigned SLTS_valve_1_background_left' and 'SLTS_valve_1_background_right'change color as expected, default text in the text box with ID 'SLTS_valve_1_value' disappears when the Synoptic Panel loads. The contents of a text box with ID 'SLTS_point_1_value' associated with the numeric data point also disappears and is not replaced with live data.
I am running Scada-LTS on a Windows 10 computer in docker containers and have tried Microsoft Edge and Firefox browsers. Has anybody else experienced this problem and come up with a solution, or did I miss something in the tutorial?
I want to calculate and display the average scroll depth in Data Studio from analytics.
I’m looking to get an average scroll depth in Studio. I’ve got the 10%,25%, etc scroll depth data coming in, but I now need to be able to calculate the average scroll % from this data.
To calculate the average scroll depth:
multiply the scrolled threshold by the number of events (10x500) + (20x400) + (30x475) +(40x300) + (50x200) + (60x100) +(70x75) +(80x60) + (90x20) + (100x10)
Then, take that total divided by the total number of events. 500 + 400 + 475... etc
Because I can’t reference cells in Studio I can’t get it to work. I’ve also tried Google Sheets, which does work to do the calculation, but then I can’t use Data Studios filter to provide a specific page path?
I'm thinking that perhaps the calculation will need to be done at data source, but I am not sure how to reference a 'cell'?
Data Studio doesn't work based on a concept of "cells", it works based on a concept of "fields"—which are basically properties of the data source. Similarly, you don't have "formulas" per se, but rather "calculated fields". These fields can be created either at the chart-level (single-use, but doesn't require permissions to modify the data source) or in the data source (reusable across many charts, requires permissions to modify the data source). Most fields also have an aggregation type, which tells the report how to aggregate it in charts by default (e.g. Sum or Average).
When you either edit your data source and hit "Add Field" or the option with the same name under the "Add metric" or "Add dimension" menus on a chart, you'll be presented with a box to input the formula. To access a field, just type its name (of if you're in the data source, select it from the list on the left). The editor will also typically give you an auto-complete list below your cursor based on what you're typing. Once your entry matches a field, it will get a highlight box around it (the color is based on the type; green = dimension/string,blue = metric/number). The functions available are sort of a mash-up of something between what you'd expect in Google Sheets and in a SQL query, but with more constraints on when you're allowed to use certain functions.
The documentation for calculated fields is pretty simple, so I'd recommend starting there before you try to do too much heavy-lifting in Data Studio. Because of constraints in Data Studio's data model, you'll often find that you need to create separate calculated fields for different parts of the formula, and then combine them in a new calculated field. I'll warn you that the error messages in the field editor aren't super helpful sometimes, so you may need to re-read the documentation for the functions and field types you're working with to ensure you get a valid result.
If you're running into problems, including the field names and values that you need in your calculation may help, including the source of the data (are these GA events?). The more details you give, including what you've already tried, the more helpful we can be. Also, make sure to read the docs first to make sure you have a good handle on the product you're using and the terminology the community is most likely to understand.
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.
say that I have images and I want to generate labels for them in Spanish - does the Google Cloud Vision API allow to select which language to return the labels in?
Label Detection
Google Cloud Vision APIs do not allow configuring the result language for label detection. You will need to use a different API like Cloud Translation API to perform that operation instead.
OCR (Text detection)
If you're interested in text detection in your image, Google Cloud Vision APIs support Optical Character Recognition (OCR) with automatic language detection in a broad set of languages listed here.
For TEXT_DETECTION and DOCUMENT_TEXT_DETECTION requests, you can provide languageHints parameter in the request to get better results for certain cases where the language is unknown and/or not easily detectable.
languageHints[]
string
List of languages to use for TEXT_DETECTION. In most cases, an empty
value yields the best results since it enables automatic language
detection. For languages based on the Latin alphabet, setting
languageHints is not needed. In rare cases, when the language of the
text in the image is known, setting a hint will help get better
results (although it will be a significant hindrance if the hint is
wrong). Text detection returns an error if one or more of the
specified languages is not one of the supported languages.
The DetectedLanguage information is available in the request to identify the language along with a confidence value.
Detected language for a structural component.
JSON representation
{
"languageCode": string,
"confidence": number,
}
Does iSpring presenter or any other Scorm Compliant Quiz published make available its quiz scores, slides viewed, slides count in a SCORM compliant way, which can be accessible by any other SCORM compliant quiz builder in the same manner at the Client side javascript itself or through any medium through which it can be accessed at client side.
Currently I am able to capture the Slides viewed, its count, and the quiz score from the event available in lms.js, but its specific to ISpring only.
SCORM defines standard ways to report a lot of data. Here is a complete list of the SCORM data model elements.
Quiz scores are included in this data set (cmi.score.scaled, cmi.score.raw, cmi.score.min, cmi.score.max). Unfortunately though "slides viewed" and "slides count" are not available. SCORM is intended to be content agnostic; the internal implementation of content is a black box. Not all content has "slides" (and one would argue that the best content doesn't) so it doesn't make sense to have that as a generic data model element.
SCORM does provide a data model element that records "percent compete". The cmi.progress_measure element is a scaled value between 0-1 that indicates how far along the learner is in the content. That might be a good way to capture what you are looking for. Unfortunately however, since progress measure is new to SCORM 2004, not all authoring tools will report its value.
SCORM Standard provides only a limited way to report viewer's achievents in a set of the following variables:
cmi.progress_measure (real (10,7) range (0..1), RW) Measure of the progress the learner has made toward completing the SCO
cmi.scaled_passing_score (real(10,7) range (-1 .. 1), RO) Scaled passing score required to master the SCO
cmi.score._children (scaled,raw,min,max, RO) Listing of supported data model elements
cmi.score.scaled (real (10,7) range (-1..1), RW) Number that reflects the performance of the learner
cmi.score.raw (real (10,7), RW) Number that reflects the performance of the learner relative to the range bounded by the values of min and max
cmi.score.min (real (10,7), RW) Minimum value in the range for the raw score
cmi.score.max (real (10,7), RW) Maximum value in the range for the raw score
These variables are generic and thus can be used by the variety of SCO objects. However, due to imporsonality of this generic mark, the SCOs aggregating mixed content in one unit (such as iSpring Presentations which can contain slides and quizzes) is not possible to track the detailed information - you just have a total mark.
iSpring presenter allows you to specify 'weight' of the slides and individual quizzes within the presentation when calculating the total mark.
percent of slides viewed
SlidesPercent = SlidesViewed / TotalSlides
The percent of each quiz withing the presentation
QuizPercent(i) = GatheredQuizScore(i) / MaximumScore(i)
Calculate weighted percent (the sum of each learning course item percent multiplied to the corresponding weight)
WeightedPercent = (SlidesPercent*SlidesWeight) + Sum(QuizPercent(i) * QuizWeight(i))
Calculate total weight of the learning course (the sum of quiz weights plus weight of the slides
TotalWeight = SlidesWeight + Sum(QuizWeight(i)
Calculate normalized percent of the whole learning cours (0..1)
NormalizedPercent = WeightedPercent / TotalWeight
Calculate total score of the learning course
TotalScore = NormlizedPercent * MaxScore
The total score is reported by iSpring learning content to LMS as cmi.score.raw
The normalized percent is reported to LMS as cmi.score.scaled
However due to the reasons described above it is not possible to report details to a generic SCORM-compliant LMS. The only solution is to make separate quizzes from slides.