Skip to main content

Language code

The IETF BCP 47 language tag detected for a tweet's text content; corresponds to the `lang` field returned by the X v2 API.

ApplicationsDatatype property
IRI
http://ontology.naas.ai/x/lang
Module
x ยท Applications

Domain and rangeโ€‹

Domain
Tweet Language
Range
xsd:string

Examplesโ€‹

  • en
  • es
  • fr
Turtle
@prefix ex: <https://example.org/> .

ex:tweetLanguage1 a <http://ontology.naas.ai/x/TweetLanguage> . # Tweet Language

ex:tweetLanguage1 <http://ontology.naas.ai/x/lang> "Example" . # language code
SPARQL

# Pairs linked by "language code"
SELECT ?subject ?object WHERE {
?subject <http://ontology.naas.ai/x/lang> ?object .
}
LIMIT 100

Used in ABIโ€‹

Language code is referenced in 1 file of jupyter-naas/abi (revision 56f86c1): 1 query file, across the x module.

In SPARQL queriesโ€‹

  • XSparqlQueries (x): queried by find_language_distribution, find_tweet_by_id and find_tweets_in_language.