Open bjdmeest opened 8 years ago
@borriellom can you comment on this?
@borriellom @jnehring @bjdmeest hi all any news on this topic?
Sorry for the late reply.
At the moment the term is represented in the HTML document by using the ITS Terminology category.
I'm not an expert, but I don't think we can refer the actual Tilde term. What we can do is to use the termInfoRef
attribute that can contain an IRI referring to the resource providing information about the term. You can find more on this in the ITS 2.0 Specification.
I hope this answers your question.
@borriellom can you implement this?
This is example of NIF turtle containing term and annotation:
@prefix : <https://term.tilde.com/terms/>.
...
<https://services.tilde.com/document/1#char=0,5> nif:anchorOf "Paris"@en;
nif:annotationUnit _:autos6790;
nif:beginIndex "0"^^xsd:nonNegativeInteger;
nif:endIndex "5"^^xsd:nonNegativeInteger;
nif:referenceContext <https://services.tilde.com/document/1>;
a nif:RFC5147String;
itsrdf:term "yes";
itsrdf:termInfoRef :357963.
...
And into HTML it goes like this:
<span its-term="yes" its-term-info-ref="https://term.tilde.com/terms/357963">Paris</span>
I wondering, what happens, when the term has multiple term references? How it can be included in HTML markup?
If someone wants to get any term info, it must query that IRI.
If there is a need to include full or partial term info into the HTML file, it could be done using < script > tag with id:
<script id="https://term.tilde.com/terms/357963" type="application/ld+json">
{
"@graph": [
{
"@id": "_:b0",
"label": {
"@language": "en",
"@value": "Paris"
},
"itsrdf:taConfidence": 1
},
{
"@id": "http://freme-project.eu/#char=0,5",
"@type": [
"nif:Context",
"nif:String",
"nif:RFC5147String"
],
"anchorOf": {
...etc...
</script>
@bjdmeest, the output that is embedded in the HTML markup will always be partial. The script tag sounds like a good solution. That would require a workflow like: 1) call e-terminology with HTML roundtripping to generate attributes like its-term-info-ref="https://term.tilde.com/terms/357963 2) call e-terminology with the same HTML content, but this time with json-ld output. The output will contain URIs (or abbreviated forms) like https://term.tilde.com/terms/357963 which you can use in javascript processing to e.g. visualize all term information. not nice, but I don't see a way to store all term information in HTML "inline".
@fsasaki yes, that sounds like a good workflow to me :). Indeed, not everything can be stored inside the HTML, but a reference to the term URI would already be great :)
@bjdmeest did you use this workflow? How did it work out? Can we close this issue?
@jnehring Sorry for the late reply: current HTML roundtripping does not include the its-term-info-ref attributes, so I was not able to test this workflow yet
When using e-terminology,
informat=text/html
andoutformat=text/html
results in html that only notes if a word is detected as a term, but no reference to the actual tilde terms, shouldn't these references be included? The references are included in, e.g.,outformat=text/n3
.POSTing
http://api-dev.freme-project.eu/current/e-terminology/tilde?informat=text%2Fhtml&outformat=text%2Fhtml&source-lang=en&target-lang=en&mode=annotation
with body<p>Paris is a city in France.</p>
returns<html><head><body><p><span its-term="yes">Paris</span> is a <span its-term="yes">city</span> in <span its-term="yes">France</span>.</p></body></html>
This is the same formode=annotation
as formode=full