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:
1. LEXICAL CONNECTIONS:
- ontolex:isSenseOf → word this sense belongs to
- ontolex:isLexicalizedSenseOf → synset this sense represents
2. SEMANTIC INFORMATION:
- lexinfo:senseExample → usage examples in context
- rdfs:label → sense label (e.g., "hund_1§1")
3. REGISTER AND STYLISTIC INFORMATION:
- lexinfo:register → formal register classification (e.g., ":lexinfo/slangRegister")
- lexinfo:usageNote → human-readable usage notes (e.g., "slang", "formal")
4. 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)