tagging 'plain-language' vs technical definition in a SKOS vocabulary - standards

I am trying to implement a technical glossary in SKOS (which uses BCP47) that has both a 'technical' scientific definition as well as a more accessible 'plain-language' definition. I have not been able to find an appropriate solution
Is there a best-practice for this ?

There is no specific level of technicality expressible through SKOS, but you may look into other vocabularies to find a property that would suit your needs, for example on Linked Open Vocabularies.
As for using such a property, I think the easiest would be to use rdf:CompoundLiteral to describe the literal itself:
<resource>
skos:prefLabel [
a rdf:CompoundLiteral ;
rdf:value "layman term" ;
rdf:language "en" ;
:isTechnical false
] ;
skos:altLabel [
a rdf:CompoundLiteral ;
rdf:value "technical term" ;
rdf:language "en" ;
:isTechnical true
] ;
Just remember that SKOS has an integrity condition such that only one skos:prefLabel may be present on a resource for a given language tag.
If you absolutely must use BCP47 (for language ranges, more restrictive formats etc.), I have tried to find a way to express what you want using existing standards and extensions, but I wasn't successful. In that case, the only remaining possibility is to use a private-use subtag, like "term"#en-x-tech.

Related

Google.Cloud.Translate.V3 only gives one translation result

I just switched from Google.Cloud.Translate.V2 to Google.Cloud.Translate.V3, expecting to get multiple translation options, but I only get one.
The example code seems geared for it:
foreach (Translation translation in response.Translations)
{
Console.WriteLine($"Translated text: {translation.TranslatedText}");
}
For example, the Google Translate web page translates the Spanish "Cumplan" with a main translation of English "meet" and other possibilities listed in a pane below, i.e.:
Translations of cumplir
comply
cumplir, consentir, compadecer
fulfill
cumplir, realizar
accomplish
lograr, cumplir, realizar, conseguir, alcanzar, llevar a cabo
satisfy
satisfacer, cumplir, cumplir con, aplacar, contentar, liquidar
etc.
How can I get those additional translations?
Is there a way to get the frequency it lists?
The cloud translation API doesn't support all the alternative translations - much to my chagrin - so you can't get them (as of October 2020).
The support for 'multiple' translations refers to the fact that the API supports your passing a list of strings to be translated, and so can return a response containing the translations for each string you sent it.
The API supports the translation of fairly large blocks of text, so if it returned a simple list of all the possible translations it would be really long. If there were just three words in the whole text with five possible translations instead of one, you'd have 125 different possibilities. What's needed is a more complex data structure to capture all the reasonable alternatives.
N.B. there are some existing feature requests around this issue, which you can view and indicate your interest in by 'starring' them here.

How to set up URIs for a classification that has new editions

I have a classification that at regular times has a new edition. Concepts are added, the structure may change, or properties like classification codes may change, but most concepts stay and should have stable uri's. I want to know what is the best way of uri construction to deal with these issues.
My setup tries to conform to the rule that good base uri's and concept uri's don't contain version or datetime information. The concepts themselves can always be referred to by the same identifier, unless there is a change in meaning. Then a new concept has to be created. There can be new concepts or changes to the properties of an existing concept. This is how I set it up.
concept uri's: <http://example.org/myschema/concept/1>
schema uri: <http://example.org/myschema/2018>
schema uri next version: <http://example.org/myschema/2020>
#base <http://example.org/myschema/> .
#prefix dcterms <http://purl.org/dc/terms/> .
#prefix skos <http://www.w3.org/2004/02/skos/core> .
Example of a concept:
<http://example.org/myschema/concept/1> a skos: concept ;
skos:inScheme <http://example.org/myschema/2018>;
skos:prefLabel "nameless dog";
skos:notation "AB251".
In the next version the classfication code has changed:
<http://example.org/myschema/concept/1> a skos: concept ;
skos:inScheme <http://example.org/myschema/2020>;
skos:prefLabel "nameless dog";
skos:notation "AB254";
skos:changeNote "the classification code has changed from AB251 in 2018 to AB254 in 2020 due to addition of new concepts";
dcterms:modified 2020-08-19.
I want to know what happens when someone has referenced http://example.org/myschema/concept/1 with the prefLabel and the uri, possibly even with the classification code from 2018, when in 2020 there is a new version live. The 2018 version is also still live. Maybe this should depend upon my server setup, so that I always return the latest version when none is specified. I would like to keep giving access to the older classification version, but not create confusion.

Choosing the right name for properties in schema for Weaviate

When loading my schema into Weaviate, I get an error message that the property name can not be found in the contextionary. Some of the properties I need are abbreviations.
This is the schema item it is complaining about:
{
"cardinality": "atMostOne",
"dataType": [
"boolean"
],
"description": "Is this a BLWS elbow yes or no",
"keywords": [
{
"keyword": "BLWS",
"weight": 1
}
],
"name": "blws"
}
This is the error message I get:
2019-09-04T11:47:07.202646 ERROR: {'error': [{'message': "Could not
find the word 'blws' from the property 'blws' in the class name
'Elbow' in the contextionary. Consider using keywords to define the
semantic meaning of this class."}]}
The misleading error
The error message
Consider using keywords to define the semantic meaning of this class
is outdated and and the recommendation in fact not helpful. There is already a GitHub issue to clean this up: https://github.com/semi-technologies/weaviate/issues/929
Prior to https://github.com/semi-technologies/weaviate/issues/856 it was possible to replace an unknown property word with known keywords, but #856 removed that possibility.
However, even prior to the change your schema would not have been accepted, see below.
About property names which are not in the contextionary
A property name consist of one or more recognized parts which is known by the contextionary. By "part" I mean that if you combine multiple words using camelCasing each word would be one part. So for example
drivesVehicle would be valid as it consists of two known words: drives, vehicle
drivesAVehicle would also be valid, as it contains two known words and a stop word (a). Note: Stopwords are fine as long as your property contains at least one non-stopword.
drivesBlws would be invalid, as blws is not a known word
We have discussed adding an ability to add custom words. The proposal can be considered accepted, but at the time of this writing it is not in immediate prioritization.
Why so strict about known words?
One of the core functionalities of weaviate is concept searching ("vector-based searching"), so weaviate must be able to calculate a vector position for each property. It can only do that if it recognizes the words
How to solve this?
Try describing a "blws" with known words. For example if "blws" was an acronoym for "bold long wide short", you could name the property boldLongWideShort. As mentioned above, we will add the ability to add custom words in the future, but as of now that's not supported yet.

Disabling unit-test compilation in Boost.Build

Boost.Build documentation is quite laconic when it comes to testing.
All tests in my project are defined using unit-test rule.
The only property mentioned, by the documentation, is testing.launcher, but that can only disable tests' execution when set to testing.launcher=true.
How to completely disable compilation of unit-test rules? I would like to do that temporarily, for example, by setting a property from commandline. I could not find any information how to do that or any reference documentation for other testing.* properties.
If you mean disabling them by default? You can do it by adding "explicit ;" for each unit test. If you have many such targets you can save some typing and declare a rule that does it for you, plus declaring the unit test like:
rule explicit-unit-test ( target : source : properties * )
{
unit-test $(target) : $(source) : $(properties) ;
explicit $(target) ;
}
If you want something else.. I guess you need to better explain your question because I can't think of what else you could want.
As I read most of the Boost.Build documentation and the relevant part of its code I found no way to temporary disable building specific rule or the set of targets (for example by matching tests' targets with a regular expression).
It is, also, worth noting, that unit-test was deprecated in favor of the new testing rules: run, run-fail, compile, compile-fail, link, link-fail.
Now, probably, I'm going to create my own rule, as in #GrafikRobot's answer, but instead of making the target explicit I will make the rule empty in the presence of a certain feature.
I use explicit test suites for this purpose as in
explicit X ;
test-suite X
:
[ run test1.cpp ]
[ run test2.cpp ]
[ run test3.cpp ]
[ run test4.cpp ]
;
You will need to request explicitly the execution of the tests in the test-suite X using
bjam X

Plural forms in translations of Flex programs

I want to support plural forms in translations of my Flex program properly like is possible with Qt, GWT and gettext.
Is there a (open source) library that handles this for Flex?
You don't need any additional libraries. Use standard Flex ResourceManager. In text resources define plural forms like that:
minute=minute, minutes
In this case, when you later ask for a such resource as
resourceManager.getStringArray('BundleName', 'minute')
you get the array of plural values like
[ 'minute', 'minutes' ]
Then use smth like
function getPlural(value:Number, plurals:Array):String
{
if (ResourceManager.getInstance().localeChain[0] == 'en_US')
if (value == 1) return plurals[0] else return plurals[1];
}
to select the right text for current locale. You can define this function directly in some package to be common for all classes. Unfortunately, you can not avoid such function because the plural rules of many languages are differ. For Russian, for example, the expression will be much more complicated and will take three plural word forms.
By the way, this method is very similar to how gettext works.
It is good idea to use gettext format. You have two options:
AsGettext is licensed as LGPL so it should be ok for any project.
as3-gettext

Resources