https://github.com/wacumov/wordnetdecoder
A Swift decoder for WordNets.
https://github.com/wacumov/wordnetdecoder
swift wordnet xml
Last synced: about 2 months ago
JSON representation
A Swift decoder for WordNets.
- Host: GitHub
- URL: https://github.com/wacumov/wordnetdecoder
- Owner: wacumov
- License: mit
- Created: 2020-07-12T15:05:37.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-19T15:59:28.000Z (about 3 years ago)
- Last Synced: 2025-08-16T13:14:50.882Z (2 months ago)
- Topics: swift, wordnet, xml
- Language: Swift
- Homepage:
- Size: 24.4 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WordNetDecoder
[](https://github.com/wacumov/WordNetDecoder/actions?query=workflow%3ATest+branch%3Amaster)
[](https://swiftpackageindex.com/wacumov/WordNetDecoder)
[](https://swiftpackageindex.com/wacumov/WordNetDecoder)A Swift decoder for WordNets. Basically, it's just a set of models that matches [the schema](https://globalwordnet.github.io/schemas/). All the hard work of XML parsing is doing by [this package](https://github.com/wacumov/xml2json).
## Installation
### Swift Package Manager
[Swift Package Manager](https://swift.org/package-manager/) is a tool for
managing the distribution of Swift code.
Once you have your Swift package set up, adding `WordNetDecoder` as a dependency is as
easy as adding it to the `dependencies` value of your `Package.swift`.
```swift
dependencies: [
.package(url: "https://github.com/wacumov/WordNetDecoder", from: "0.0.2")
]
```## Usage
Just read contents of a wordnet file in XML format and pass it to a `WordNetXMLDecoder`. You will get `Codable` models that are convenient to work with.
```swift
let wordnet = try WordNetXMLDecoder().decode(data)
```