Server Details
DanNet - Danish WordNet with rich lexical relationships and SPARQL access.
- Status
- Healthy
- Last Tested
- Transport
- Streamable HTTP
- URL
- Repository
- kuhumcst/DanNet
- GitHub Stars
- 24
Available Tools
14 toolsanalyze_namespace_usageTry in Inspector
Analyze namespace usage and provide resolution for prefixed properties.
This debugging tool helps understand how namespaces are used in DanNet JSON-LD data and resolves prefixed URIs to full forms.
Args: entity_data: Any DanNet JSON-LD entity data
Returns: Dict with namespace analysis and URI resolution
| Name | Required | Description | Default |
|---|---|---|---|
| entity_data | Yes |
autocomplete_danish_wordTry in Inspector
Get autocomplete suggestions for Danish word prefixes.
Useful for discovering Danish vocabulary or finding the correct spelling of words. Returns lemma forms (dictionary forms) of words.
Args: prefix: The beginning of a Danish word (minimum 3 characters required) max_results: Maximum number of suggestions to return (default: 10)
Returns: Comma-separated string of word completions in alphabetical order
Note: Autocomplete requires at least 3 characters to prevent excessive results.
Example: suggestions = autocomplete_danish_word("hyg", 5) # Returns: "hygge, hyggelig, hygiejne"
| Name | Required | Description | Default |
|---|---|---|---|
| prefix | Yes | ||
| max_results | No |
extract_semantic_dataTry in Inspector
Extract and normalize semantic data from any DanNet JSON-LD entity.
This tool provides a unified way to extract semantic information from synsets, words, or senses, handling different JSON-LD structures consistently.
Args: entity_data: Any DanNet entity JSON-LD data
Returns: Dict with normalized semantic information
| Name | Required | Description | Default |
|---|---|---|---|
| entity_data | Yes |
fetch_ddo_definitionTry in Inspector
Fetch the full, untruncated definition from DDO (Den Danske Ordbog) for a synset.
This tool addresses the issue that DanNet synset definitions (:skos/definition) may be capped at a certain length. It retrieves the complete definition from the authoritative DDO source by following sense source URLs.
WORKFLOW:
Get synset information to find associated senses
Extract DDO source URLs from sense data (dns:source)
Fetch DDO HTML pages and parse for definitions
Find elements with class "definitionBox selected" and extract span.definition content
IMPORTANT NOTES:
Looks for CSS classes "definitionBox selected" and child span.definition
DDO and DanNet have diverged over time, so source URLs may not always work
This implementation uses httpx for web requests and regex-based HTML parsing
Args: synset_id: Synset identifier (e.g., "synset-1876" or just "1876")
Returns: Dict containing: - synset_id: The queried synset ID - ddo_definitions: List of definitions found from DDO pages - source_urls: List of DDO URLs that were attempted - success_urls: List of URLs that successfully returned definitions - errors: List of any errors encountered - truncated_definition: The original DanNet definition for comparison
Example: result = fetch_ddo_definition("synset-3047") # Check result['ddo_definitions'] for full DDO definitions # Compare with result['truncated_definition'] from DanNet
| Name | Required | Description | Default |
|---|---|---|---|
| synset_id | Yes |
get_current_dannet_serverTry in Inspector
Get information about the currently active DanNet server.
Returns: Dict with current server information: - server_url: The base URL of the current DanNet server - server_type: "local", "remote", or "custom" - status: Connection status information
Example: info = get_current_dannet_server() # Returns: {"server_url": "https://wordnet.dk", "server_type": "remote", "status": "active"}
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
get_entity_infoTry in Inspector
Get comprehensive RDF data for any entity in the DanNet database.
Supports both DanNet entities and external vocabulary entities loaded into the triplestore from various schemas and datasets.
UNDERSTANDING THE DATA MODEL: The DanNet database contains entities from multiple sources:
DanNet entities (namespace="dn"): synsets, words, senses, and other resources
External entities (other namespaces): OntoLex vocabulary, Inter-Lingual Index, etc.
All entities follow RDF patterns with namespace prefixes for properties and relationships.
NAVIGATION TIPS:
DanNet synsets have rich semantic relationships (wn:hypernym, wn:hyponym, etc.)
External entities provide vocabulary definitions and cross-references
Use parse_resource_id() on URI references to get clean IDs
Check @type to understand what kind of entity you're working with
Args: identifier: Entity identifier (e.g., "synset-3047", "word-11021628", "LexicalConcept", "i76470") namespace: Namespace for the entity (default: "dn" for DanNet entities) - "dn": DanNet entities via /dannet/data/ endpoint - Other values: External entities via /dannet/external/{namespace}/ endpoint - Common external namespaces: "ontolex", "ili", "wn", "lexinfo", etc.
Returns: Dict containing JSON-LD format with: - @context → namespace mappings (if applicable) - @id → entity identifier - @type → entity type - All RDF properties with namespace prefixes (e.g., wn:hypernym, ontolex:evokes) - For DanNet synsets: dns:ontologicalType and dns:sentiment (if applicable) - Entity-specific convenience fields (synset_id, resource_id, etc.)
Examples: # DanNet entities get_entity_info("synset-3047") # DanNet synset get_entity_info("word-11021628") # DanNet word get_entity_info("sense-21033604") # DanNet sense
| Name | Required | Description | Default |
|---|---|---|---|
| namespace | No | dn | |
| identifier | Yes |
get_sense_infoTry in Inspector
Get comprehensive RDF data for a DanNet sense (lexical sense).
UNDERSTANDING THE DATA MODEL: Senses are ontolex:LexicalSense instances connecting words to synsets. They represent specific meanings of words with examples and definitions.
KEY RELATIONSHIPS:
LEXICAL CONNECTIONS:
ontolex:isSenseOf → word this sense belongs to
ontolex:isLexicalizedSenseOf → synset this sense represents
SEMANTIC INFORMATION:
lexinfo:senseExample → usage examples in context
rdfs:label → sense label (e.g., "hund_1§1")
REGISTER AND STYLISTIC INFORMATION:
lexinfo:register → formal register classification (e.g., ":lexinfo/slangRegister")
lexinfo:usageNote → human-readable usage notes (e.g., "slang", "formal")
SOURCE INFORMATION:
dns:source → source URL for this sense entry
DDO CONNECTION (Den Danske Ordbog): DanNet senses are derived from DDO (ordnet.dk), the authoritative modern Danish dictionary.
SENSE LABELS: The format "word_entry§definition" connects to DDO structure:
"hund_1§1" = word "hund", entry 1, definition 1 in DDO
"forlygte_§2" = word "forlygte", definition 2 in DDO
The § notation directly corresponds to DDO's definition numbering
SOURCE TRACEABILITY: The dns:source URLs link back to specific DDO entries:
Format: https://ordnet.dk/ddo/ordbog?entry_id=X&def_id=Y&query=word
Note: Some DDO URLs may not resolve correctly if IDs have changed since import
If the DDO page loads correctly, the relevant definition has CSS class "selected"
METADATA ORIGINS: Usage examples, register information, and definitions flow from DDO's corpus-based lexicographic data, providing authoritative linguistic information.
NAVIGATION TIPS:
Follow ontolex:isSenseOf to find the parent word
Follow ontolex:isLexicalizedSenseOf to find the synset
Check lexinfo:senseExample for usage examples from DDO corpus
Check lexinfo:register and lexinfo:usageNote for stylistic information
Use dns:source to attempt tracing back to original DDO definition (with caveats)
Use parse_resource_id() on URI references to get clean IDs
Args: sense_id: Sense identifier (e.g., "sense-21033604" or just "21033604")
Returns: Dict containing: - All RDF properties with namespace prefixes (e.g., ontolex:isSenseOf) - resource_id → clean identifier for convenience - All sense properties and relationships
Example: info = get_sense_info("sense-21033604") # "hund_1§1" sense # Check info['ontolex:isSenseOf'] for parent word # Check info['ontolex:isLexicalizedSenseOf'] for synset # Check info['lexinfo:senseExample'] for usage examples from DDO # Check info['lexinfo:register'] for register classification # Check info['lexinfo:usageNote'] for usage notes like "slang" # Check info['dns:source'] for DDO source URL (may not always work)
| Name | Required | Description | Default |
|---|---|---|---|
| sense_id | Yes |
get_synset_infoTry in Inspector
Get comprehensive RDF data for a DanNet synset (lexical concept).
UNDERSTANDING THE DATA MODEL: Synsets are ontolex:LexicalConcept instances representing word meanings. They connect to words via ontolex:isEvokedBy and have rich semantic relations.
KEY RELATIONSHIPS (by importance):
TAXONOMIC (most fundamental):
wn:hypernym → broader concept (e.g., "hund" → "pattedyr")
wn:hyponym → narrower concepts (e.g., "hund" → "puddel", "schæfer")
dns:orthogonalHypernym → cross-cutting categories [Danish: ortogonalt hyperonym]
LEXICAL CONNECTIONS:
ontolex:isEvokedBy → words expressing this concept [Danish: fremkaldes af]
ontolex:lexicalizedSense → sense instances [Danish: leksikaliseret betydning]
wn:similar → related but distinct concepts
PART-WHOLE RELATIONS:
wn:mero_part/wn:holo_part → component relationships [English: meronym/holonym part]
wn:mero_substance/wn:holo_substance → material composition
wn:mero_member/wn:holo_member → membership relations
SEMANTIC PROPERTIES:
dns:ontologicalType → semantic classification with @set array of dnc: types Common types: dnc:Animal, dnc:Human, dnc:Object, dnc:Physical, dnc:Dynamic (events/actions), dnc:Static (states)
dns:sentiment → emotional polarity with marl:hasPolarity and marl:polarityValue
wn:lexfile → semantic domain (e.g., "noun.food", "verb.motion")
skos:definition → synset definition (may be truncated for length)
CROSS-LINGUISTIC:
wn:ili → Interlingual Index for cross-language mapping
wn:eq_synonym → Open English WordNet equivalent
DDO CONNECTION FOR FULLER DEFINITIONS: DanNet synset definitions (skos:definition) may be truncated (ending with "…"). For complete definitions, use the fetch_ddo_definition() tool which automatically retrieves full DDO text, or manually examine sense source URLs via get_sense_info().
NAVIGATION TIPS:
Follow wn:hypernym chains to find semantic categories
Check dns:inherited for properties from parent synsets
Use parse_resource_id() on URI references to get clean IDs
For fuller definitions, examine individual sense source URLs via get_sense_info()
Args: synset_id: Synset identifier (e.g., "synset-1876" or just "1876")
Returns: Dict containing JSON-LD format with: - @context → namespace mappings - @id → entity identifier (e.g., "dn:synset-1876") - @type → "ontolex:LexicalConcept" - All RDF properties with namespace prefixes (e.g., wn:hypernym) - dns:ontologicalType → {"@set": ["dnc:Animal", ...]} (if applicable) - dns:sentiment → {"marl:hasPolarity": "marl:Positive", "marl:polarityValue": "3"} (if applicable) - synset_id → clean identifier for convenience
Example: info = get_synset_info("synset-52") # cake synset # Check info['wn:hypernym'] for parent concepts # Check info['dns:ontologicalType']['@set'] for semantic types # Check info['dns:sentiment']['marl:hasPolarity'] for sentiment
| Name | Required | Description | Default |
|---|---|---|---|
| synset_id | Yes |
get_word_infoTry in Inspector
Get comprehensive RDF data for a DanNet word (lexical entry).
UNDERSTANDING THE DATA MODEL: Words are ontolex:LexicalEntry instances representing lexical forms. They connect to synsets via senses and have morphological information.
KEY RELATIONSHIPS:
LEXICAL CONNECTIONS:
ontolex:evokes → synsets this word can express
ontolex:sense → sense instances connecting word to synsets
ontolex:canonicalForm → canonical form with written representation
MORPHOLOGICAL PROPERTIES:
lexinfo:partOfSpeech → part of speech classification
wn:partOfSpeech → WordNet part of speech
ontolex:canonicalForm/ontolex:writtenRep → written form
CROSS-REFERENCES:
owl:sameAs → equivalent resources in other datasets
dns:source → source URL for this word entry
NAVIGATION TIPS:
Follow ontolex:evokes to find synsets this word expresses
Check ontolex:sense for detailed sense information
Use parse_resource_id() on URI references to get clean IDs
Args: word_id: Word identifier (e.g., "word-11021628" or just "11021628")
Returns: Dict containing: - All RDF properties with namespace prefixes (e.g., ontolex:evokes) - resource_id → clean identifier for convenience - All linguistic properties and relationships
Example: info = get_word_info("word-11021628") # "hund" word # Check info['ontolex:evokes'] for synsets this word can express # Check info['ontolex:sense'] for senses
| Name | Required | Description | Default |
|---|---|---|---|
| word_id | Yes |
get_word_synonymsTry in Inspector
Find synonyms for a Danish word through shared synsets (word senses).
SYNONYM TYPES IN DANNET:
True synonyms: Words sharing the exact same synset
Context-specific: Different synonyms for different word senses Note: Near-synonyms via wn:similar relations are not currently included
The function returns all words that share synsets with the input word, effectively finding lexical alternatives that express the same concepts.
Args: word: The Danish word to find synonyms for
Returns: Comma-separated string of synonymous words (aggregated across all word senses)
Example: synonyms = get_word_synonyms("hund") # Returns: "køter, vovhund, vovse"
Note: Check synset definitions to understand which synonyms apply to which meaning (polysemy is common in Danish).
| Name | Required | Description | Default |
|---|---|---|---|
| word | Yes |
get_word_synsetsTry in Inspector
Get synsets (word meanings) for a Danish word, returning a sorted list of lexical concepts.
DanNet follows the OntoLex-Lemon model where:
Words (ontolex:LexicalEntry) evoke concepts through senses
Synsets (ontolex:LexicalConcept) represent units of meaning
Multiple words can share the same synset (synonyms)
One word can have multiple synsets (polysemy)
This function returns all synsets associated with a word, effectively giving you all the different meanings/senses that word can have. Each synset represents a distinct semantic concept with its own definition and semantic relationships.
Common patterns in Danish:
Nouns often have multiple senses (e.g., "kage" = cake/lump)
Verbs distinguish motion vs. state (e.g., "løbe" = run/flow)
Check synset's dns:ontologicalType for semantic classification
DDO CONNECTION AND SYNSET LABELS: Synset labels are compositions of DDO-derived sense labels, showing all words that express the same meaning. For example:
"{hund_1§1; køter_§1; vovhund_§1; vovse_§1}" = all words meaning "domestic dog"
"{forlygte_§2; babs_§1; bryst_§2; patte_1§1a}" = all words meaning "female breast"
Each individual sense label follows DDO structure:
"hund_1§1" = word "hund", entry 1, definition 1 in DDO (ordnet.dk)
"patte_1§1a" = word "patte", entry 1, definition 1, subdefinition a
The § notation connects directly to DDO's definition numbering system
This composition reveals the semantic relationships between Danish words and their shared meanings, all traceable back to authoritative DDO lexicographic data.
RETURN BEHAVIOR: This function has two possible return modes depending on search results:
MULTIPLE RESULTS: Returns List[SearchResult] with basic information for each synset
SINGLE RESULT (redirect): Returns full synset data Dict when DanNet automatically redirects to a single synset. This provides immediate access to all semantic relationships, ontological types, sentiment data, and other rich information without requiring a separate get_synset_info() call.
The single-result case is equivalent to calling get_synset_info() on the synset, providing the same comprehensive RDF data structure with all semantic relations.
Args: query: The Danish word or phrase to search for
Returns: MULTIPLE RESULTS: List of SearchResult objects with: - word: The lexical form - synset_id: Unique synset identifier (format: synset-NNNNN) - label: Human-readable synset label (e.g., "{kage_1§1}") - definition: Brief semantic definition (may be truncated with "...")
Examples: # Multiple results case results = get_word_synsets("hund") # Returns list of search result dictionaries for all meanings of "hund" # => [{"word": "hund", "synset_id": "synset-3047", ...}, ...]
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| language | No | da |
sparql_queryTry in Inspector
Execute a SPARQL SELECT query against the DanNet triplestore.
This tool provides direct access to DanNet's RDF data through SPARQL queries. The query is automatically prepended with common namespace prefix declarations, so you can use short prefixes instead of full URIs in your queries.
PERFORMANCE OPTIMIZATION WARNING: Avoid queries that create cartesian products (cross joins) as they can cause timeouts. Common problematic patterns include:
Comparing all entities with labels containing word X to all entities with labels containing word Y
Multiple unconnected graph patterns without shared variables (e.g., ?x a Type1. ?y a Type2.)
Excessive OPTIONAL clauses that multiply result combinations
Broad FILTER operations on string matching across large result sets
Instead, use specific entity URIs (e.g., dn:synset-2228), connect patterns with shared variables, apply LIMIT clauses, and prefer VALUES lists over broad FILTER conditions. Start with targeted queries on known entities, then explore their direct relationships using specific property paths.
KNOWN PREFIXES (automatically declared):
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs: http://www.w3.org/2000/01/rdf-schema#
owl: http://www.w3.org/2002/07/owl#
wn: https://globalwordnet.github.io/schemas/wn#
ontolex: http://www.w3.org/ns/lemon/ontolex#
skos: http://www.w3.org/2004/02/skos/core#
lexinfo: http://www.lexinfo.net/ontology/3.0/lexinfo#
marl: http://www.gsi.upm.es/ontologies/marl/ns#
olia: http://purl.org/olia/olia.owl#
dcat: http://www.w3.org/ns/dcat#
vann: http://purl.org/vocab/vann/
foaf: http://xmlns.com/foaf/0.1/
dc: http://purl.org/dc/terms/
dc11: http://purl.org/dc/elements/1.1/
cc: http://creativecommons.org/ns#
ili: http://globalwordnet.org/ili/
lime: http://www.w3.org/ns/lemon/lime#
schema: http://schema.org/
synsem: http://www.w3.org/ns/lemon/synsem#
enl: https://en-word.net/lemma/
en: https://en-word.net/id/
enold: http://wordnet-rdf.princeton.edu/id/
cor: https://ordregister.dk/id/
dds: https://wordnet.dk/sentiment/
dn: https://wordnet.dk/dannet/data/
dnc: https://wordnet.dk/dannet/concepts/
dns: https://wordnet.dk/dannet/schema/
tr: https://wordnet.dk/dannet/translations/
COMMON QUERY PATTERNS:
Find all synsets for a word:
SELECT ?synset ?definition WHERE { ?entry ontolex:canonicalForm/ontolex:writtenRep "hund"@da . ?entry ontolex:sense/ontolex:isLexicalizedSenseOf ?synset . ?synset skos:definition ?definition . }
Find hypernyms (broader concepts):
SELECT ?hypernym ?label WHERE { dn:synset-3047 wn:hypernym ?hypernym . ?hypernym rdfs:label ?label . }
Find functional relations (DanNet-specific "used for" patterns):
SELECT ?tool ?toolLabel ?purpose ?purposeLabel WHERE { ?tool dns:usedFor ?purpose . ?tool rdfs:label ?toolLabel . ?purpose rdfs:label ?purposeLabel . }
Discover thematic role patterns (agents of actions):
SELECT ?action ?actionLabel ?agent ?agentLabel WHERE { ?action wn:involved_agent ?agent . ?action rdfs:label ?actionLabel . ?agent rdfs:label ?agentLabel . }
Find co-occurrence patterns (systematic co-occurrences):
SELECT ?concept ?conceptLabel ?coAgent ?coAgentLabel WHERE { ?concept wn:co_agent_instrument ?coAgent . ?concept rdfs:label ?conceptLabel . ?coAgent rdfs:label ?coAgentLabel . }
Explore cross-cutting categories (orthogonal hypernyms):
SELECT ?specific ?specificLabel ?ortho ?orthoLabel WHERE { ?specific dns:orthogonalHypernym ?ortho . ?specific rdfs:label ?specificLabel . ?ortho rdfs:label ?orthoLabel . }
Find synsets with ontological types (stored as RDF Bags):
SELECT ?synset ?label ?type WHERE { ?synset dns:ontologicalType ?typeNode . ?typeNode rdf:_0 ?type . ?synset rdfs:label ?label . }
Explore causality chains:
SELECT ?cause ?causeLabel ?effect ?effectLabel WHERE { ?cause wn:causes ?effect . ?cause rdfs:label ?causeLabel . ?effect rdfs:label ?effectLabel . }
Args: query: SPARQL SELECT query string (prefixes will be automatically added) timeout: Query timeout in milliseconds (default: 5000, max: 10000) max_results: Maximum number of results to return (default: 100, max: 100)
Returns: Dict containing SPARQL results in standard JSON format: - head: Query metadata with variable names - results: Bindings array with variable-value mappings Each value includes type (uri/literal) and language information when applicable
FASCINATING RELATIONSHIP EXAMPLES FROM DANNET:
Functional Relations (dns:usedFor):
{idrætshal; sportshal} used for {idræt; sport} (sports hall used for sports)
{faldskærm; skærm} used for {idræt; sport} (parachute used for sports)
{sportstøj} used for {idræt; sport} (sportswear used for sports)
Thematic Roles (wn:involved_agent):
{kommunikere} typically involves agent {presseattaché} (communication involves press attaché)
{skrive} typically involves agent {informationsmedarbejder} (writing involves information worker)
Co-occurrence Patterns (wn:co_agent_instrument):
{krig} co-occurs with agent-instrument {våben} (war systematically co-occurs with weapons)
{verdenskrig} co-occurs with agent-instrument {våben} (world war co-occurs with weapons)
Cross-cutting Categories (dns:orthogonalHypernym):
{fiskefartøj} has orthogonal hypernym {fartøj} (fishing vessel has cross-cutting category vessel)
{handelsfartøj} has orthogonal hypernym {fartøj} (merchant vessel has cross-cutting category vessel)
These examples show how DanNet captures not just taxonomic relationships but also functional, instrumental, and systematic co-occurrence patterns in Danish language and culture.
Example Usage: # Simple entity lookup result = sparql_query("SELECT ?s ?p ?o WHERE { dn:synset-3047 ?p ?o } LIMIT 10")
Note: Only SELECT queries are supported. The query is validated before execution.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| timeout | No | ||
| max_results | No |
switch_dannet_serverTry in Inspector
Switch between local and remote DanNet servers on the fly.
This tool allows you to change the DanNet server endpoint during runtime without restarting the MCP server. Useful for switching between development (local) and production (remote) servers.
Args: server: Server to switch to. Options: - "local": Use localhost:3456 (development server) - "remote": Use wordnet.dk (production server) - Custom URL: Any valid URL starting with http:// or https://
Returns: Dict with status information: - status: "success" or "error" - message: Description of the operation - previous_url: The URL that was previously active - current_url: The URL that is now active
Example: # Switch to local development server result = switch_dannet_server("local")
| Name | Required | Description | Default |
|---|---|---|---|
| server | Yes |
validate_synset_structureTry in Inspector
Validate and analyze the structure of synset JSON-LD data.
This enhanced tool helps debug and understand synset data structure, providing validation and insights into the JSON-LD format.
Args: synset_data: Synset data returned from get_synset_info()
Returns: Dict with validation results and structural analysis
| Name | Required | Description | Default |
|---|---|---|---|
| synset_data | Yes |
FAQ
How do I claim this server?
To claim this server, publish a /.well-known/glama.json file on your server's domain with the following structure:
The email address must match the email associated with your Glama account. Once verified, the server will appear as claimed by you.
What are the benefits of claiming a server?
- Control your server's listing on Glama, including description and metadata
- Receive usage reports showing how your server is being used
- Get monitoring and health status updates for your server
Your Connectors
Sign in to create a connector for this server.