{"id":32181994,"url":"https://github.com/ontodev/howl","last_synced_at":"2025-10-21T22:57:00.336Z","repository":{"id":57713717,"uuid":"56337113","full_name":"ontodev/howl","owner":"ontodev","description":"HOWL: Humane OWL Format","archived":false,"fork":false,"pushed_at":"2017-03-17T01:10:59.000Z","size":881,"stargazers_count":16,"open_issues_count":20,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-21T22:56:53.767Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://try.humaneowl.com","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ontodev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-15T17:12:56.000Z","updated_at":"2020-11-12T09:27:41.000Z","dependencies_parsed_at":"2022-08-25T12:40:09.636Z","dependency_job_id":null,"html_url":"https://github.com/ontodev/howl","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ontodev/howl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontodev%2Fhowl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontodev%2Fhowl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontodev%2Fhowl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontodev%2Fhowl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ontodev","download_url":"https://codeload.github.com/ontodev/howl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontodev%2Fhowl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280348058,"owners_count":26315367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-21T22:56:58.964Z","updated_at":"2025-10-21T22:57:00.327Z","avatar_url":"https://github.com/ontodev.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/ontodev/howl.svg?branch=master)](https://travis-ci.org/ontodev/howl)\n[![Clojars Project](https://img.shields.io/clojars/v/howl.svg)](https://clojars.org/howl)\n\n# HOWL: Humane OWL Format\n\nHOWL makes it easy for humans to read and write [RDF](http://www.w3.org/TR/rdf11-concepts/) and [OWL](http://www.w3.org/TR/owl2-overview/). Here you'll find a description of HOWL, examples, and tools for working with HOWL data.\n\n[**Try HOWL!**](http://try.humaneowl.com)\n\nThis is work-in-progress. Your [feedback](http://github.com/ontodev/howl/issues) is appreciated!\n\n## Example\n\n    PREFIX rdf:\u003e http://www.w3.org/1999/02/22-rdf-syntax-ns#\n    PREFIX rdfs:\u003e http://www.w3.org/2000/01/rdf-schema#\n    PREFIX xsd:\u003e http://www.w4.org/2001/XMLSchema#\n    PREFIX owl:\u003e http://www.w3.org/2002/07/owl#\n    PREFIX obo:\u003e http://purl.obolibrary.org/obo/\n    PREFIX ex:\u003e http://example.com/\n\n    LABEL rdf:type: type\n    LABEL rdfs:label: label\n    LABEL rdfs:comment: comment\n    LABEL obo:BFO_0000051: has part\n    TYPE comment:\u003e xsd:string\n\n    ex:ontology\n    label: Example Ontology\n    type:\u003e owl:Ontology\n\n    ex:foo\n    label: Foo\n    type:\u003e owl:Class\n    comment: A comment on 'Foo'.@en\n    \u003e comment: An annotation on the comment.^^xsd:string\n    \u003e\u003e comment: An annotation on the annotation.\n    comment: Values can span multiple lines,\n      and include blank lines...\n\n      as long as each line after the first\n      is indented with two spaces.\n\n    ex:bar\n    label: Bar\n    type:\u003e owl:Class\n    subClassOf:\u003e\u003e 'has part' some Bar\n\n    # Lines starting with '#' are just comments.\n\nFor more examples, see the [demo site](http://try.humaneowl.com),\nthe [ontology](ontology) directory,\nand the [Makefile](Makefile).\n\n\n## Status\n\nThe [0.2](https://github.com/ontodev/howl/tree/v0.2.0) series supports:\n\n- draft HOWL syntax (some changes from [0.1](https://github.com/ontodev/howl/tree/v0.1.1))\n- basic OWL class expressions from [Protégé](http://protege.stanford.edu):\n  `not`, `and`, `or`, `some`, `only`\n- converting HOWL to N-Triples, N-Quads, or JSON\n\nYou can use another tool such as [rapper](http://librdf.org/raptor/rapper.html) or [Jena riot](https://jena.apache.org/documentation/io/) to convert from N-Triples/N-Quads to any other concrete RDF or OWL syntax.\n\n**Not yet supported:** Converting to HOWL from other RDF and OWL syntaxes.\n\n\n## Installation and Usage\n\nYou can install HOWL as:\n\n1. a command-line tool (`howl`)\n2. a Clojure library\n3. a JavaScript library\n\n\n### 1. Command Line Tool\n\nThe `howl` command-line tool requires Java (1.6+). On Unix (Linux, Mac OS X):\n\n1. [Download a released version of the `howl-X.Y.Z.jar` file](https://github.com/ontodev/howl/releases), or build it yourself by following the instructions below\n2. Rename the file to `howl`, put it on your PATH, and make it executable: `chmod +x howl`\n3. Run `howl` on one or more HOWL files to convert them to N-Triples:\n\n```\nhowl input.howl input2.howl \u003e output.nt\n```\n\nRun `howl --help` for more options. The `howl` file is a JAR, so you can also run `java -jar howl`, with standard Java options.\n\nOn Windows, download the JAR file and run it from the Command Prompt using Java (not tested!):\n\n```\njava -jar howl.jar input.howl input2.howl \u003e output.nt\n```\n\n\n### 2. Clojure Library\n\nHOWL is also available as a Clojure/ClojureScript library. See the Clojars page for details:\n\n[![Clojars Project](https://img.shields.io/clojars/v/howl.svg)](https://clojars.org/howl)\n\n\n### 3. JavaScript Library\n\n1. [Download a released version of the `howl-X.Y.Z.js` file](https://github.com/ontodev/howl/releases), or build it yourself by following the instructions below\n2. Add a `\u003cscript\u003e` tag to your HTML page: `\u003cscript src=\"howl.js\" type=\"text/javascript\" charset=\"utf-8\"\u003e\u003c/script\u003e`\n3. Call one of the [API functions](src/howl/api.cljc):\n\n```\nvar your_quad_string = howl.api.convert_to_quads(your_howl_string);\n```\n\nIt might also work under Node.js -- let us know!\n\n\n## Features\n\nFeatures in this example:\n\n- `PREFIX ex:\u003e http://example.com/`\n    - set prefixes, similar to Turtle and SPARQL\n- `LABEL obo:BFO_0000051: has part`\n    - like PREFIXes for single terms\n- `TYPE comment:\u003e xsd:string`\n    - set default language tag or datatype for a predicate\n- prefixes, labels, and types\n    - can occur at any point in the document\n    - can be included from an external document, keeping the main document very simple\n    - can be automatically generated using tools (not yet supported)\n- `ex:ontology`\n    - specify the current subject by its prefixed name, IRI, or label\n- `label: Example Ontology`\n    - use `: ` for literal statements\n    - specify a predicate by its prefixed name, IRI, or label\n    - literals quotation marks\n    - multi-line literals are indented\n    - optionally append a language tag or datatype\n- `type:\u003e owl:Ontology`\n    - use `:\u003e ` for link statements (when the object is a node)\n    - specify the object by its prefixed name, IRI, or label\n- `subClassOf:\u003e\u003e 'has part' some Bar`\n    - use `:\u003e\u003e ` for expression statements\n    - supports Manchester syntax, as used in [Protégé](http://protege.stanford.edu)\n- `\u003e comment: An annotation on the comment.^^xsd:string`\n    - use `\u003e ` for an OWL annotation\n    - use `\u003e\u003e ` for nested annotations (and so on)\n\nOther features, not in this example:\n\n- RDF dataset support: default graph and zero or more named graphs using `GRAPH`\n- set or change the `BASE` IRI at any point in the document\n\nBehind the scenes:\n\n- line-based format for stream processing\n- JSON format for parse information, for language agnostic tooling\n\nHOWL is designed to be simple and predictable. The most common mistakes will probably be using a label that has not been defined, or using the wrong separator.\n\n- `: ` for text, numbers, dates, and other literal values\n- `:\u003e ` for links\n- `:\u003e\u003e ` for complex expressions, i.e. things that link to things\n\nThere are plans for tools that will:\n\n- check for missing labels\n- checking for dangerous or misleading labels\n- find missing labels among a list of ontologies, and write them to a file\n- update labels, using the IRI to replacing an old label with a new label\n- \"linting\" statements to infer whether the user meant to use a literal, link, or expression\n\n\n## Labels\n\nRDF is built up from [IRIs](http://tools.ietf.org/html/rfc3987). IRIs provide a flexible system for using, creating, and reusing a practically unlimited number of globally unique names. But IRIs are often difficult for humans to read and write.\n\nThe prefixed names used in Turtle and SPARQL syntax are shorter than full IRIs and are often easier to read and write. We have tools for translating between prefixed names and their full IRIs.\n\nHOWL goes one step further, supporting human-readable labels in almost every place that an IRI can be used. The HOWL tools take care of the translation between labels and the IRIs that they denote. A HOWL label is a string that:\n\n- must not begin or end with whitespace\n- must not contain newlines or tabs\n- must not begin with a reserved word (case sensitive) followed by a space: BASE, PREFIX, LABEL, TYPE, GRAPH\n- must not begin with `#`\n- must not begin with `\u003e`\n- must not contain `: ` (colon space)\n- must not contain `:\u003e ` (colon arrow space)\n- must not contain `:\u003e\u003e ` (colon arrow arrow space)\n\nHOWL labels are defined either by `LABEL` blocks, or when an `rdfs:label` is asserted for a subject and that label meets these criteria.\n\n\n## Syntax and Parsing\n\nHOWL is build from a sequence of \"blocks\". Each block is a string consisting of one line of text, followed by zero or more blank or indented lines of text. HOWL is designed for streaming, so a sequence of files is transformed into a sequence of parsed blocks. Each parsed block can be represented as a JSON object.\n\nThese are all the block types:\n\n- Blank\n- Comment\n- BASE\n- PREFIX\n- LABEL\n- TYPE\n- GRAPH\n- Subject\n- Literal (a statement in which the object is an RDF literal)\n- Link (a statement in which the object is an RDF node)\n- Expression (a statement in which the object is an OWL expression)\n\n\n### Blank\n\nIf a HOWL stream starts with blank lines, these will be parsed as blank blocks. We keep track of this whitespace so that we can process a file and render it back with the exact formatting the user provided. Note that blank lines that don't being a stream are merged into the previous block.\n\nThis blank block:\n\n        \n\nis parsed into this JSON object:\n\n    {\"file-name\": \"example.howl\",\n     \"line-number\": 1,\n     \"block\": \"    \\n\",\n     \"block-type\": \"BLANK_BLOCK\",\n     \"parse\": [\"BLANK_BLOCK\"\n               [\"EOL\" \"    \\n\"]],\n     \"eol\": \"    \\n\"}\n\n\n### Comment\n\nComment blocks do not specify any information for HOWL, but the parser does keep track of them. A comment line **must** start with '#' -- the '#' has no special meaning unless it is the first character on a line.\n\nThis comment block:\n\n    # Just a comment.\n\nis parsed into this JSON object:\n\n    {\"file-name\": \"example.howl\",\n     \"line-number\": 1,\n     \"block\": \"# Just a comment.\\n\",\n     \"block-type\": \"COMMENT_BLOCK\",\n     \"parse\": [\"COMMENT_BLOCK\"\n               \"# \",\n               \"Just a comment.\"\n               [\"EOL\" \"\\n\"]],\n     \"hash\": \"# \",\n     \"comment\": \"Just a comment.\",\n     \"eol\": \"\\n\"}\n\n\n### BASE\n\nBase blocks set the current base IRI for resolving relative IRIs. Multiple base blocks can occur, each changing the current base from that point until the next base block.\n\nThis prefix block:\n\n    BASE http://example.com/\n\nis parsed into this JSON object:\n\n    {\"file-name\": \"example.howl\",\n     \"line-number\": 1,\n     \"block\": \"BASE http://example.com/\\n\",\n     \"block-type\": \"BASE_BLOCK\",\n     \"parse\": [\"BASE_BLOCK\"\n               \"BASE\"\n               [\"SPACES\" \" \"]\n               [\"BASE\" [\"ABSOLUTE_IRI\" \"http://example.com/\"]]\n               [\"EOL\" \"\\n\"]],\n     \"base\": [\"ABSOLUTE_IRI\" \"http://example.com/\"],\n     \"eol\": \"\\n\"}\n\n\n### PREFIX\n\nPrefix blocks are identical to SPARQL prefix lines.\n\nThis prefix block:\n\n    PREFIX rdf:\u003e http://www.w3.org/1999/02/22-rdf-syntax-ns#\n\nis parsed into this JSON object:\n\n    {\"file-name\": \"example.howl\",\n     \"line-number\": 1,\n     \"block\": \"PREFIX rdf:\u003e http://www.w3.org/1999/02/22-rdf-syntax-ns#\\n\",\n     \"block-type\": \"PREFIX_BLOCK\",\n     \"parse\": [\"PREFIX_BLOCK\"\n               \"PREFIX\"\n               [\"SPACES\" \" \"]\n               [\"PREFIX\" \"rdf\"]\n               [\"COLON_ARROW\" \"\" \":\u003e\" \" \"]\n               [\"PREFIXED\"\n                [\"ABSOLUTE_IRI\" \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"]]\n               [\"EOL\" \"\\n\"]],\n     \"prefix\": \"rdf\",\n     \"prefixed\": [\"ABSOLUTE_IRI\" \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"],\n     \"eol\": \"\\n\"}\n\n\n### LABEL\n\nHOWL makes RDF more readable by using labels rather than IRIs and prefixed names whenever possible. Label blocks allow you to associate a label to an identifier, without making any other assertions about it -- no triple will be generated. If you want to assert that a subject has a label, use the special `label:` predicate shown below.\n\nThis label block:\n\n    LABEL rdfs:comment: comment\n\nis parsed into this JSON object:\n\n    {\"file-name\": \"example.howl\",\n     \"line-number\": 1,\n     \"block\": \"LABEL rdfs:comment: comment\\n\",\n     \"block-type\": \"LABEL_BLOCK\",\n     \"parse\": [\"LABEL_BLOCK\"\n               \"LABEL\"\n               [\"SPACES\" \" \"]\n               [\"IDENTIFIER\" [\"PREFIXED_NAME\" \"rdfs\" \":\" \"comment\"]]\n               [\"COLON\" \"\" \":\" \" \"]\n               [\"LABEL\" \"comment\"]\n               [\"EOL\" \"\\n\"]],\n     \"identifier\": [\"PREFIXED_NAME\" \"rdfs\" \":\" \"comment\"],\n     \"label\": \"comment\",\n     \"eol\": \"\\n\"}\n\n\n### TYPE\n\nLike JSON-LD, HOWL allows you to associate a default datatype (or language tag) with a predicate. Unless they specify a datatype (or language tag), any literal object for that predicate will use that datatype (or language tag). No triple is generated for a type block.\n\nThis type block:\n\n    TYPE comment:\u003e xsd:string\n\nis parsed into this JSON object:\n\n    {\"file-name\": \"example.howl\",\n     \"line-number\": 1,\n     \"block\": \"TYPE comment:\u003e xsd:string\\n\",\n     \"block-type\": \"TYPE_BLOCK\",\n     \"parse\": [\"TYPE_BLOCK\"\n               \"TYPE\"\n               [\"SPACES\" \" \"]\n               [\"PREDICATE\" [\"LABEL\" \"comment\"]]\n               [\"COLON_ARROW\" \"\" \":\u003e\" \" \"]\n               [\"DATATYPE\" [\"PREFIXED_NAME\" \"xsd\" \":\" \"string\"]]\n               [\"EOL\" \"\\n\"]],\n     \"predicate\": [\"LABEL\" \"comment\"],\n     \"datatype\": [\"PREFIXED_NAME\" \"xsd\" \":\" \"string\"],\n     \"eol\": \"\\n\"}\n\n\n### GRAPH\n\nA HOWL file specifies an RDF dataset, with a default RDF graph and zero or more named RDF graphs. For each block there is a current graph, starting with the default graph, and changed whenever a graph block occurs. Every subject and statement block is assigned to the current graph.\n\nGraph blocks have two forms:\n\n1. `GRAPH IDENTIFIER` specifies a named graph; the IDENTIFIER will also be the subject, so it can be followed by statements about the named graph\n2. `GRAPH` specifies the default graph; the default graph cannot be a subject\n\nThis graph block:\n\n    GRAPH ex:graph\n\nis parsed into this JSON object:\n\n    {\"file-name\": \"example.howl\",\n     \"line-number\": 1,\n     \"block\": \"GRAPH ex:graph\\n\",\n     \"block-type\": \"GRAPH_BLOCK\",\n     \"parse\": [\"GRAPH_BLOCK\"\n               \"GRAPH\"\n               [\"SPACES\" \" \"]\n               [\"GRAPH\" [\"PREFIXED_NAME\" \"ex\" \":\" \"graph\"]]\n               [\"EOL\" \"\\n\"]],\n     \"graph\": [\"PREFIXED_NAME\" \"ex\" \":\" \"graph\"],\n     \"eol\": \"\\n\"}\n\nThis graph block:\n\n    GRAPH\n\nis parsed into this JSON object:\n\n    {\"file-name\": \"example.howl\",\n     \"line-number\": 1,\n     \"block\": \"GRAPH\\n\",\n     \"block-type\": \"GRAPH_BLOCK\",\n     \"parse\": [\"GRAPH_BLOCK\"\n               \"GRAPH\"\n               [\"EOL\" \"\\n\"]],\n     \"eol\": \"\\n\"}\n\n\n### Subject\n\nA subject block is just the identifier or label for a subject. It specifies the current\n\nThis subject block:\n\n    ex:subject\n\nis parsed into this JSON object:\n\n    {\"file-name\": \"example.howl\",\n     \"line-number\": 1,\n     \"block\": \"ex:subject\\n\",\n     \"block-type\": \"SUBJECT_BLOCK\",\n     \"parse\": [\"SUBJECT_BLOCK\"\n               [\"SUBJECT\" [\"PREFIXED_NAME\" \"ex\" \":\" \"subject\"]]\n               [\"EOL\" \"\\n\"]],\n     \"subject\": [\"PREFIXED_NAME\" \"ex\" \":\" \"subject\"],\n     \"eol\": \"\\n\"}\n\n\n### Literal\n\nThe key difference between the HOWL syntax for literals and the Turtle or NTriples syntax is that HOWL does not require quotation marks. A literal block consists of a predicate, a `: ` (colon and one or more spaces), followed by the literal content, and optionally ending with a language tag or datatype.\n\nThis literal block:\n\n    comment: This comment has a datatype.^^xsd:string\n\nis parsed into this JSON object:\n\n    {\"file-name\": \"example.howl\",\n     \"line-number\": 1,\n     \"block\": \"comment: This comment has a datatype.^^xsd:string\\n\",\n     \"block-type\": \"LITERAL_BLOCK\",\n     \"parse\": [\"LITERAL_BLOCK\"\n               [\"ARROWS\" \"\" \"\"]\n               [\"PREDICATE\" [\"LABEL\" \"comment\"]]\n               [\"COLON\" \"\" \":\" \" \"]\n               [\"LITERAL\"\n                \"This comment has a datatype.\"\n                \"^^\"\n                [\"DATATYPE\" [\"PREFIXED_NAME\" \"xsd\" \":\" \"string\"]]]\n               [\"EOL\" \"\\n\"]],\n     \"arrows\": \"\",\n     \"predicate\": [\"LABEL\" \"comment\"],\n     \"content\": \"This comment has a datatype.\",\n     \"datatype\": [\"PREFIXED_NAME\" \"xsd\" \":\" \"string\"],\n     \"eol\": \"\\n\"}\n\nSo these HOWL blocks:\n\n```\nPREFIX rdfs:\u003e http://www.w3.org/2000/01/rdf-schema#\nPREFIX xsd:\u003e http://www.w4.org/2001/XMLSchema#\nPREFIX ex:\u003e http://example.com\nLABEL rdfs:comment: comment\nGRAPH ex:graph\nex:subject\ncomment: This comment has a datatype.^^xsd:string\n```\n\nspecify this NQuad (with newlines added for readability):\n\n```\n\u003chttp://example.com/graph\u003e\n\u003chttp://example.com/subject\u003e\n\u003chttp://www.w3.org/1999/02/22-rdf-syntax-ns#comment\u003e\n\"This comment has a datatype.\"^^\u003chttp://www.w4.org/2001/XMLSchema#string\u003e .\n```\n\n\n### Link\n\nTo express a triple where the object is an IRI, we use a link block. The subject for the link block will be whatever the current subject is, as specified in a previous subject block or graph block. The link block consists of a predicate, a `:\u003e ` (colon, arrow, and one or more spaces) separator, and an object. The predicate can be a prefixed name, IRI, or label. The object can be any of these, or a blank node.\n\nThis link block:\n\n    rdf:type:\u003e owl:Class\n\nis parsed into this JSON object:\n\n    {\"file-name\": \"example.howl\",\n     \"line-number\": 1,\n     \"block\": \"rdf:type:\u003e owl:Class\\n\",\n     \"block-type\": \"LINK_BLOCK\",\n     \"parse\": [\"LINK_BLOCK\"\n               [\"ARROWS\" \"\" \"\"]\n               [\"PREDICATE\" [\"PREFIXED_NAME\" \"rdf\" \":\" \"type\"]]\n               [\"COLON_ARROW\" \"\" \":\u003e\" \" \"]\n               [\"OBJECT\" [\"PREFIXED_NAME\" \"owl\" \":\" \"Class\"]]\n               [\"EOL\" \"\\n\"]],\n     \"arrows\": \"\",\n     \"predicate\": [\"PREFIXED_NAME\" \"rdf\" \":\" \"type\"],\n     \"object\": [\"PREFIXED_NAME\" \"owl\" \":\" \"Class\"],\n     \"eol\": \"\\n\"}\n\nSo these HOWL blocks:\n\n```\nPREFIX rdf:\u003e http://www.w3.org/1999/02/22-rdf-syntax-ns#\nPREFIX owl:\u003e http://www.w3.org/2002/07/owl#\nPREFIX ex:\u003e http://example.com\nGRAPH ex:graph\nex:subject\nrdf:type:\u003e owl:Class\n```\n\nspecify this NQuad (with newlines added for readability):\n\n```\n\u003chttp://example.com/graph\u003e\n\u003chttp://example.com/subject\u003e\n\u003chttp://www.w3.org/1999/02/22-rdf-syntax-ns#type\u003e\n\u003chttp://www.w3.org/2002/07/owl#Class\u003e .\n```\n\n### Expression\n\nHOWL files can also contain OWL class expressions in the version of Manchester syntax familiar from the [Protégé](http://protege.stanford.edu) editor. The subject for the expression block will be whatever the current subject is, as specified in a previous subject block or graph block. The expression block consists of a predicate, a `:\u003e\u003e ` (colon, two arrows, and one or more spaces) separator, and an expression string. The predicate can be a prefixed name, IRI, or label.\n\nThis expression block:\n\n    rdfs:subClassOf:\u003e\u003e 'has part' some foo\n\nis parsed into this JSON object:\n\n    {\"file-name\": \"example.howl\",\n     \"line-number\": 1,\n     \"block\": \"rdfs:subClassOf:\u003e\u003e 'has part' some foo\\n\",\n     \"block-type\": \"EXPRESSION_BLOCK\",\n     \"parse\": [\"EXPRESSION_BLOCK\"\n               [\"PREDICATE\" [\"PREFIXED_NAME\" \"rdfs\" \":\" \"subClassOf\"]]\n               [\"COLON_ARROWS\" \"\" \":\u003e\u003e\" \" \"]\n               [\"MN_CLASS_EXPRESSION\"\n                [\"MN_SOME\"\n                 [\"MN_OBJECT_PROPERTY_EXPRESSION\"\n                  [\"MN_NAME\" [\"MN_QUOTED_LABEL\" \"'\" \"has part\" \"'\"]]]\n                 [\"MN_SPACE\" \" \"]\n                 \"some\"\n                 [\"MN_SPACE\" \" \"]\n                 [\"MN_CLASS_EXPRESSION\"\n                  [\"MN_NAME\" [\"MN_LABEL\" \"foo\"]]]]]\n               [\"EOL\" \"\\n\"]],\n     \"predicate\": [\"PREFIXED_NAME\" \"rdfs\" \":\" \"subClassOf\"],\n     \"expression\": [\"MN_CLASS_EXPRESSION\"\n                    [\"MN_SOME\"\n                     [\"MN_OBJECT_PROPERTY_EXPRESSION\"\n                      [\"MN_NAME\" [\"MN_QUOTED_LABEL\" \"'\" \"has part\" \"'\"]]]\n                     [\"MN_SPACE\" \" \"]\n                     \"some\"\n                     [\"MN_SPACE\" \" \"]\n                     [\"MN_CLASS_EXPRESSION\"\n                      [\"MN_NAME\" [\"MN_LABEL\" \"foo\"]]]]],\n     \"eol\": \"\\n\"}\n\nSo these HOWL blocks:\n\n```\nPREFIX rdf:\u003e http://www.w3.org/1999/02/22-rdf-syntax-ns#\nPREFIX owl:\u003e http://www.w3.org/2002/07/owl#\nPREFIX ex:\u003e http://example.com\nGRAPH ex:graph\nex:subject\nowl:subClassOf:\u003e\u003e 'has part' some foo\n```\n\nspecify these NTriples (with newlines added for readability):\n\n```\n_:b1\n\u003chttp://www.w3.org/1999/02/22-rdf-syntax-ns#type\u003e\n\u003chttp://www.w3.org/2002/07/owl#Restriction\u003e .\n\n_:b1\n\u003chttp://www.w3.org/2002/07/owl#onProperty\u003e\n\u003chttp://purl.obolibrary.org/obo/BFO_0000051\u003e .\n\n_:b1\n\u003chttp://www.w3.org/2002/07/owl#someValuesFrom\u003e\n\u003chttp://example.com/foo\u003e .\n\n\u003chttp://example.com/subject\u003e\n\u003chttp://www.w3.org/2000/01/rdf-schema#subClassOf\u003e\n_:b1 .\n```\n\n\n### Annotations\n\nHOWL includes a convenient syntax for OWL annotations: one or more `\u003e` \"arrows\" preceding a link block or literal block changes the subject to a previous statement.\n\nThis literal block:\n\n    \u003e comment: A comment on a comment.\n\nis parsed into this JSON object:\n\n    {\"file-name\": \"example.howl\",\n     \"line-number\": 1,\n     \"block\": \"\u003e comment: A comment on a comment.\\n\"\n     \"block-type\": \"LITERAL_BLOCK\",\n     \"parse\": [\"LITERAL_BLOCK\"\n               [\"ARROWS\" \"\u003e\" \" \"]\n               [\"PREDICATE\" [\"LABEL\" \"comment\"]]\n               [\"COLON\" \"\" \":\" \" \"]\n               [\"LITERAL\"\n                \"A comment on a comment.\"]\n               [\"EOL\" \"\\n\"]],\n     \"arrows\": \"\u003e\",\n     \"predicate\": [\"LABEL\" \"comment\"],\n     \"content\": \"A comment on a comment.\",\n     \"eol\": \"\\n\"}\n\nSo these HOWL blocks:\n\n```\nPREFIX rdf:\u003e http://www.w3.org/1999/02/22-rdf-syntax-ns#\nPREFIX owl:\u003e http://www.w3.org/2002/07/owl#\nPREFIX ex:\u003e http://example.com\nLABEL rdfs:comment: comment\nGRAPH ex:graph\nex:subject\ncomment: This comment has a datatype.^^xsd:string\n\u003e comment: A comment on a comment.\n```\n\nspecify these six NTriples (with newlines added for readability):\n\n1. the target statement\n2. the type of annotation: `owl:Axiom`\n3. the subject of the target: `owl:annotatedSource`\n4. the predicate of the target: `owl:annotatedProperty`\n5. the object of the target: `owl:annotatedTarget`\n6. the annotation statement\n\n```\n\u003chttp://example.com/subject\u003e\n\u003chttp://www.w3.org/1999/02/22-rdf-syntax-ns#comment\u003e\n\"This comment has a datatype.\"^^\u003chttp://www.w4.org/2001/XMLSchema#string\u003e .\n\n_:b1\n\u003chttp://www.w3.org/1999/02/22-rdf-syntax-ns#type\u003e\n\u003chttp://www.w3.org/2002/07/owl#Axiom\u003e .\n\n_:b1\n\u003chttp://www.w3.org/2002/07/owl#annotatedSource\u003e\n\u003chttp://example.com/subject\u003e .\n\n_:b1\n\u003chttp://www.w3.org/2002/07/owl#annotatedProperty\u003e\n\u003chttp://www.w3.org/1999/02/22-rdf-syntax-ns#comment\u003e .\n\n_:b1\n\u003chttp://www.w3.org/2002/07/owl#annotatedTarget\u003e\n\"This comment has a datatype.\"^^\u003chttp://www.w4.org/2001/XMLSchema#string\u003e .\n\n_:b1\n\u003chttp://www.w3.org/1999/02/22-rdf-syntax-ns#comment\u003e\n\"A comment on a comment.\" .\n```\n\nNesting is allowed. The number of arrows specifies the depth of the nesting:\n\n```\ncomment: A -- original comment\n\u003e comment: B -- comment on A\n\u003e\u003e comment: C -- comment on B\n\u003e comment: D -- another comment on A\n```\n\n\n## Build\n\nThe `howl` tool is written in Clojure. [Leiningen](http://leiningen.org) 2.5.2+ is required to build it.\n\n- `lein uberjar` builds a standalone JAR file in `target/`\n- `lein cljsbuild once` builds a JavaScript file in `target/`\n- `lein test` runs the unit and integration tests\n- `lein run` can be used to compile and run the command-line interface during development\n\nThe [Makefile](Makefile) also contains some convenient build tasks.\n\n\n## Release History\n\n- 0.2.1-SNAPSHOT\n  - add `--context` command-line option\n  - changed default output format to N-Quads\n  - rework TYPE and literal representation to match [EDN-LD](http://edn-ld.com)\n- 0.2.0 improve grammar\n  - allow comments\n  - PREFIX now uses `:\u003e `, for consistency\n  - TYPE now uses `:\u003e `, for consistency\n  - absolute IRIs don't have to be wrapped in angle brackets\n  - allow initial blank lines\n- 0.1.1\n  - add cross-platform support: Clojure and ClojureScript\n  - add cross-platform API in `api.cljc`\n  - add `--version` command-line option\n  - fix named graph support\n  - fix relative IRI resolution\n  - fix: TYPE can be language tag\n  - refactor render-quads\n  - more tests\n- 0.1.0 initial release\n  - draft HOWL syntax\n  - basic OWL class expressions from [Protégé](http://protege.stanford.edu):\n    `not`, `and`, `or`, `some`, `only`\n  - converting HOWL to N-Triples, N-Quads, or JSON\n\n\n## License\n\nCopyright © 2016, James A. Overton\n\nDistributed under the Simplified BSD License: [http://opensource.org/licenses/BSD-2-Clause]()\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fontodev%2Fhowl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fontodev%2Fhowl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fontodev%2Fhowl/lists"}