diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..2ef7cfe167a13673e57f0c5fa2e7b99f7e2daf81 --- /dev/null +++ b/.gitignore @@ -0,0 +1,127 @@ +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + + +# From : https://gist.github.com/edesdan/6bb43343740bcd54ef0f56a384a2f66f +# Folder view configuration files +.DS_Store +Desktop.ini + +# Thumbnail cache files +._* +Thumbs.db + +# Files that might appear on external disks +.Spotlight-V100 +.Trashes + +# Mac +.DS_Store + +# From : https://github.com/github/gitignore/blob/master/Java.gitignore +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + + +# From : https://github.com/github/gitignore/blob/master/Maven.gitignore +target/ +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +pom.xml.next +release.properties +dependency-reduced-pom.xml +buildNumber.properties +.mvn/timing.properties +# https://github.com/takari/maven-wrapper#usage-without-binary-jar +.mvn/wrapper/maven-wrapper.jar diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..73f69e0958611ac6e00bde95641f6699030ad235 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/artifacts/unl2rdf_jar.xml b/.idea/artifacts/unl2rdf_jar.xml new file mode 100644 index 0000000000000000000000000000000000000000..3e01f27e701eae1e6be0f5f19380aed4023a67fe --- /dev/null +++ b/.idea/artifacts/unl2rdf_jar.xml @@ -0,0 +1,9 @@ +<component name="ArtifactManager"> + <artifact type="jar" name="unl2rdf:jar"> + <output-path>$PROJECT_DIR$/out/artifacts/unl2rdf_jar</output-path> + <root id="archive" name="unl2rdf.jar"> + <element id="module-output" name="unl2rdf" /> + <element id="extracted-dir" path="$MAVEN_REPOSITORY$/info/picocli/picocli/4.2.0/picocli-4.2.0.jar" path-in-jar="/" /> + </root> + </artifact> +</component> \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000000000000000000000000000000000000..0e3eb3ec37e25901c2ddd4407813aef087cd3780 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="CompilerConfiguration"> + <annotationProcessing> + <profile name="Maven default annotation processors profile" enabled="true"> + <sourceOutputDir name="target/generated-sources/annotations" /> + <sourceTestOutputDir name="target/generated-test-sources/test-annotations" /> + <outputRelativeToContentRoot value="true" /> + <module name="rdf" /> + <module name="unl-parser" /> + </profile> + <profile name="Annotation profile for unl2rdf" enabled="true"> + <sourceOutputDir name="target/generated-sources/annotations" /> + <sourceTestOutputDir name="target/generated-test-sources/test-annotations" /> + <outputRelativeToContentRoot value="true" /> + <option name="project" value="unl2rdf/unl2rdf-app" /> + <processorPath useClasspath="false"> + <entry name="$MAVEN_REPOSITORY$/info/picocli/picocli-codegen/4.2.0/picocli-codegen-4.2.0.jar" /> + <entry name="$MAVEN_REPOSITORY$/info/picocli/picocli/4.2.0/picocli-4.2.0.jar" /> + </processorPath> + <module name="unl2rdf-app" /> + </profile> + </annotationProcessing> + <bytecodeTargetLevel target="11"> + <module name="rdf" target="11" /> + <module name="unl-parser" target="11" /> + <module name="unl2rdf" target="11" /> + <module name="unl2rdf-app" target="11" /> + </bytecodeTargetLevel> + </component> + <component name="JavacSettings"> + <option name="ADDITIONAL_OPTIONS_OVERRIDE"> + <module name="unl-parser" options="" /> + <module name="unl2rdf" options="-Aproject=unl2rdf/unl2rdf" /> + <module name="unl2rdf-app" options="-Aproject=unl2rdf/unl2rdf-app" /> + </option> + </component> +</project> \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000000000000000000000000000000000000..574f024d40961b1a31dae99281a61850566fdd4d --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="Encoding"> + <file url="file://$PROJECT_DIR$/rdf/src/main/java" charset="UTF-8" /> + <file url="file://$PROJECT_DIR$/rdf/src/main/resources" charset="UTF-8" /> + <file url="file://$PROJECT_DIR$/unl-parser/src/main/java" charset="UTF-8" /> + <file url="file://$PROJECT_DIR$/unl2rdf-app/src/main/java" charset="UTF-8" /> + <file url="file://$PROJECT_DIR$/unl2rdf-app/src/main/resources" charset="UTF-8" /> + </component> +</project> \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000000000000000000000000000000000000..712ab9d985c20018a0c97b93d2148ac1ffe588a5 --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="RemoteRepositoriesConfiguration"> + <remote-repository> + <option name="id" value="central" /> + <option name="name" value="Central Repository" /> + <option name="url" value="https://repo.maven.apache.org/maven2" /> + </remote-repository> + <remote-repository> + <option name="id" value="central" /> + <option name="name" value="Maven Central repository" /> + <option name="url" value="https://repo1.maven.org/maven2" /> + </remote-repository> + <remote-repository> + <option name="id" value="jboss.community" /> + <option name="name" value="JBoss Community repository" /> + <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" /> + </remote-repository> + </component> +</project> \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000000000000000000000000000000000000..ee0869e4848b1bf27ebe83f42480980b3d8c759e --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="MavenProjectsManager"> + <option name="originalFiles"> + <list> + <option value="$PROJECT_DIR$/pom.xml" /> + <option value="$PROJECT_DIR$/../rdf/pom.xml" /> + </list> + </option> + <option name="ignoredFiles"> + <set> + <option value="$PROJECT_DIR$/pom.xml" /> + </set> + </option> + </component> + <component name="ProjectRootManager" version="2" languageLevel="JDK_13" default="false" project-jdk-name="11" project-jdk-type="JavaSDK" /> +</project> \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000000000000000000000000000000000000..0224bb787dcab87e5036092ce3e15d7da8eef59c --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectModuleManager"> + <modules> + <module fileurl="file://$PROJECT_DIR$/rdf/rdf.iml" filepath="$PROJECT_DIR$/rdf/rdf.iml" /> + <module fileurl="file://$PROJECT_DIR$/unl-parser/unl-parser.iml" filepath="$PROJECT_DIR$/unl-parser/unl-parser.iml" /> + <module fileurl="file://$PROJECT_DIR$/unl2rdf-app/unl2rdf-app.iml" filepath="$PROJECT_DIR$/unl2rdf-app/unl2rdf-app.iml" /> + </modules> + </component> +</project> \ No newline at end of file diff --git a/.idea/unl2rdf.iml b/.idea/unl2rdf.iml new file mode 100644 index 0000000000000000000000000000000000000000..d6ebd4805981b8400db3e3291c74a743fef9a824 --- /dev/null +++ b/.idea/unl2rdf.iml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="true"> + <exclude-output /> + <content url="file://$MODULE_DIR$" /> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + </component> +</module> \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000000000000000000000000000000000..35eb1ddfbbc029bcab630581847471d7f238ec53 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="VcsDirectoryMappings"> + <mapping directory="" vcs="Git" /> + </component> +</project> \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..a220588de214e24927631e7655aeb1a0194bc44e --- /dev/null +++ b/pom.xml @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>unl2rdf</groupId> + <artifactId>unl2rdf</artifactId> + <version>1.0-SNAPSHOT</version> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <packaging>pom</packaging> + + <modules> + <module>unl-parser</module> + <module>unl2rdf-app</module> + <module>rdf</module> + </modules> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-clean-plugin</artifactId> + <version>3.1.0</version> + <configuration> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.8.1</version> + <configuration> + <source>11</source> + <target>11</target> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-deploy-plugin</artifactId> + <version>3.0.0-M1</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>3.2.0</version> + <configuration> + <archive> + <manifest> + <addClasspath>true</addClasspath> + <mainClass>unl2rdf.Unl2Rdf</mainClass> + <classpathPrefix>dependency-jars/</classpathPrefix> + </manifest> + </archive> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <version>3.1.0</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-site-plugin</artifactId> + <version>3.9.0</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <version>3.0.0-M4</version> + <configuration> + <groups>acceptance | !feature-a</groups> + <excludedGroups>integration, regression</excludedGroups> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>3.1.2</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-assembly-plugin</artifactId> + <version>3.3.0</version> + </plugin> + </plugins> + </build> + <dependencies> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter</artifactId> + <version>5.7.0-M1</version> + <scope>test</scope> + </dependency> + </dependencies> + + +</project> diff --git a/rdf/pom.xml b/rdf/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..68c64ff9635be0c68f3a1ae700b0f3de05f0622e --- /dev/null +++ b/rdf/pom.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <artifactId>unl2rdf</artifactId> + <groupId>unl2rdf</groupId> + <version>1.0-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + + <artifactId>rdf</artifactId> + + <dependencies> + <dependency> + <groupId>org.apache.jena</groupId> + <artifactId>apache-jena-libs</artifactId> + <type>pom</type> + <version>3.14.0</version> + </dependency> + </dependencies> + +</project> \ No newline at end of file diff --git a/rdf/rdf.iml b/rdf/rdf.iml new file mode 100644 index 0000000000000000000000000000000000000000..332efe5737c2ad31cef037e6f80903aee8444f4d --- /dev/null +++ b/rdf/rdf.iml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11"> + <output url="file://$MODULE_DIR$/target/classes" /> + <output-test url="file://$MODULE_DIR$/target/test-classes" /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> + <excludeFolder url="file://$MODULE_DIR$/target" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="library" name="Maven: org.apache.jena:jena-shacl:3.14.0" level="project" /> + <orderEntry type="library" name="Maven: org.apache.jena:jena-arq:3.14.0" level="project" /> + <orderEntry type="library" name="Maven: org.apache.jena:jena-core:3.14.0" level="project" /> + <orderEntry type="library" name="Maven: org.apache.jena:jena-iri:3.14.0" level="project" /> + <orderEntry type="library" name="Maven: commons-cli:commons-cli:1.4" level="project" /> + <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.13" level="project" /> + <orderEntry type="library" name="Maven: org.apache.jena:jena-base:3.14.0" level="project" /> + <orderEntry type="library" name="Maven: org.apache.commons:commons-csv:1.7" level="project" /> + <orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.19" level="project" /> + <orderEntry type="library" name="Maven: com.github.andrewoma.dexx:collection:0.7" level="project" /> + <orderEntry type="library" name="Maven: org.apache.jena:jena-shaded-guava:3.14.0" level="project" /> + <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.10" level="project" /> + <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.12" level="project" /> + <orderEntry type="library" name="Maven: com.github.jsonld-java:jsonld-java:0.12.5" level="project" /> + <orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" /> + <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.1" level="project" /> + <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.1" level="project" /> + <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.1" level="project" /> + <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient-cache:4.5.10" level="project" /> + <orderEntry type="library" name="Maven: org.apache.thrift:libthrift:0.13.0" level="project" /> + <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" /> + <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.26" level="project" /> + <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" /> + <orderEntry type="library" name="Maven: org.apache.jena:jena-tdb:3.14.0" level="project" /> + <orderEntry type="library" name="Maven: org.apache.jena:jena-tdb2:3.14.0" level="project" /> + <orderEntry type="library" name="Maven: org.apache.jena:jena-dboe-storage:3.14.0" level="project" /> + <orderEntry type="library" name="Maven: org.apache.jena:jena-dboe-trans-data:3.14.0" level="project" /> + <orderEntry type="library" name="Maven: org.apache.jena:jena-dboe-transaction:3.14.0" level="project" /> + <orderEntry type="library" name="Maven: org.apache.jena:jena-dboe-base:3.14.0" level="project" /> + <orderEntry type="library" name="Maven: org.apache.jena:jena-dboe-index:3.14.0" level="project" /> + <orderEntry type="library" name="Maven: org.apache.jena:jena-rdfconnection:3.14.0" level="project" /> + <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.26" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.7.0-M1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.7.0-M1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.7.0-M1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.7.0-M1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.7.0-M1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.7.0-M1" level="project" /> + </component> +</module> \ No newline at end of file diff --git a/rdf/src/main/java/UnlDocumentToRdfConverter.java b/rdf/src/main/java/UnlDocumentToRdfConverter.java new file mode 100644 index 0000000000000000000000000000000000000000..0de039b7ca8205a9e72ff1a5a29d0ff1066199a2 --- /dev/null +++ b/rdf/src/main/java/UnlDocumentToRdfConverter.java @@ -0,0 +1,2 @@ +public class UnlDocumentToRdfConverter { +} diff --git a/rdf/src/main/java/VocabularyUnl.java b/rdf/src/main/java/VocabularyUnl.java new file mode 100644 index 0000000000000000000000000000000000000000..ea97b219e63c9a9facf5d7328485b71be0b8bd78 --- /dev/null +++ b/rdf/src/main/java/VocabularyUnl.java @@ -0,0 +1,951 @@ +/* CVS $Id: $ */ + +import org.apache.jena.rdf.model.*; +import org.apache.jena.ontology.*; + +/** + * Vocabulary definitions from VocabularyUnl.ttl + * @author Auto-generated by schemagen on 07 May 2020 17:43 + */ +public class VocabularyUnl { + /** <p>The ontology model that holds the vocabulary terms</p> */ + private static final OntModel M_MODEL = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM, null ); + + /** <p>The namespace of the vocabulary as a string</p> */ + public static final String NS = "https://unl.tetras-libre.fr/rdf/schema#"; + + /** <p>The namespace of the vocabulary as a string</p> + * @return namespace as String + * @see #NS */ + public static String getURI() {return NS;} + + /** <p>The namespace of the vocabulary as a resource</p> */ + public static final Resource NAMESPACE = M_MODEL.createResource( NS ); + + /** <p>For detailled specifications about UNL Universal Relations, see : http://www.unlweb.net/wiki/Universal_Relations + * Universal Relations, formerly known as "links", are labelled arcs connecting + * a node to another node in a UNL graph. They correspond to two-place semantic + * predicates holding between two Universal Words. In UNL, universal relations + * have been normally used to represent semantic cases or thematic roles (such + * as agent, object, instrument, etc.) between UWs. The repertoire of universal + * relations is defined in the UNL Specs and it is not open to frequent additions. + * Universal Relations are organized in a hierarchy where lower nodes subsume + * upper nodes. The topmost level is the relation "rel", which simply indicates + * that there is a semantic relation between two elements. Universal Relations + * as Object Properties are used only in UNL Knowledge Bases. In UNL graphs, + * you must use the reified versions of those properties in order to specify + * the scopes (and not only the sources and targets).</p> + */ + public static final ObjectProperty Universal_Relation = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#Universal_Relation" ); + + public static final ObjectProperty agt = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#agt" ); + + public static final ObjectProperty and = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#and" ); + + public static final ObjectProperty ant = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#ant" ); + + public static final ObjectProperty aoj = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#aoj" ); + + public static final ObjectProperty bas = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#bas" ); + + public static final ObjectProperty ben = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#ben" ); + + public static final ObjectProperty cnt = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#cnt" ); + + public static final ObjectProperty con = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#con" ); + + public static final ObjectProperty coo = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#coo" ); + + public static final ObjectProperty dur = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#dur" ); + + public static final ObjectProperty equ = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#equ" ); + + public static final ObjectProperty exp = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#exp" ); + + public static final ObjectProperty fld = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#fld" ); + + public static final ObjectProperty gol = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#gol" ); + + public static final ObjectProperty has_occurrence = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#has_occurrence" ); + + public static final ObjectProperty has_scope = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#has_scope" ); + + public static final ObjectProperty has_source = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#has_source" ); + + public static final ObjectProperty has_target = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#has_target" ); + + public static final ObjectProperty icl = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#icl" ); + + public static final ObjectProperty ins = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#ins" ); + + public static final ObjectProperty iof = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#iof" ); + + public static final ObjectProperty is_occurrence_of = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#is_occurrence_of" ); + + public static final ObjectProperty is_scope_of = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#is_scope_of" ); + + public static final ObjectProperty is_source_of = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#is_source_of" ); + + public static final ObjectProperty is_substructure_of = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#is_substructure_of" ); + + public static final ObjectProperty is_superstructure_of = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#is_superstructure_of" ); + + public static final ObjectProperty is_target_of = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#is_target_of" ); + + public static final ObjectProperty lpl = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#lpl" ); + + public static final ObjectProperty man = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#man" ); + + public static final ObjectProperty mat = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#mat" ); + + public static final ObjectProperty met = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#met" ); + + public static final ObjectProperty mod = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#mod" ); + + public static final ObjectProperty nam = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#nam" ); + + public static final ObjectProperty obj = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#obj" ); + + public static final ObjectProperty opl = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#opl" ); + + public static final ObjectProperty or = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#or" ); + + public static final ObjectProperty per = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#per" ); + + public static final ObjectProperty plc = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#plc" ); + + public static final ObjectProperty pof = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#pof" ); + + public static final ObjectProperty pos = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#pos" ); + + public static final ObjectProperty ptn = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#ptn" ); + + public static final ObjectProperty pur = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#pur" ); + + public static final ObjectProperty qua = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#qua" ); + + public static final ObjectProperty res = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#res" ); + + public static final ObjectProperty rsn = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#rsn" ); + + public static final ObjectProperty seq = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#seq" ); + + public static final ObjectProperty src = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#src" ); + + public static final ObjectProperty tim = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#tim" ); + + public static final ObjectProperty tmf = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#tmf" ); + + public static final ObjectProperty tmt = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#tmt" ); + + public static final ObjectProperty unlObjectProperty = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#unlObjectProperty" ); + + public static final ObjectProperty via = M_MODEL.createObjectProperty( "https://unl.tetras-libre.fr/rdf/schema#via" ); + + public static final DatatypeProperty has_attribute = M_MODEL.createDatatypeProperty( "https://unl.tetras-libre.fr/rdf/schema#has_attribute" ); + + public static final DatatypeProperty unlDatatypeProperty = M_MODEL.createDatatypeProperty( "https://unl.tetras-libre.fr/rdf/schema#unlDatatypeProperty" ); + + public static final AnnotationProperty has_id = M_MODEL.createAnnotationProperty( "https://unl.tetras-libre.fr/rdf/schema#has_id" ); + + public static final AnnotationProperty has_master_definition = M_MODEL.createAnnotationProperty( "https://unl.tetras-libre.fr/rdf/schema#has_master_definition" ); + + public static final AnnotationProperty unlAnnotationProperty = M_MODEL.createAnnotationProperty( "https://unl.tetras-libre.fr/rdf/schema#unlAnnotationProperty" ); + + public static final OntProperty unlProperty = M_MODEL.createOntProperty( "https://unl.tetras-libre.fr/rdf/schema#unlProperty" ); + + public static final OntClass __ = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@1" ); + + public static final OntClass ___CLASS = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@2" ); + + public static final OntClass ___CLASS1 = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@3" ); + + public static final OntClass ability = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@ability" ); + + public static final OntClass about = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@about" ); + + public static final OntClass above = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@above" ); + + public static final OntClass according_to = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@according_to" ); + + public static final OntClass across = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@across" ); + + public static final OntClass active = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@active" ); + + public static final OntClass adjective = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@adjective" ); + + public static final OntClass adverb = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@adverb" ); + + public static final OntClass advice = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@advice" ); + + public static final OntClass after = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@after" ); + + public static final OntClass again = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@again" ); + + public static final OntClass against = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@against" ); + + public static final OntClass agreement = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@agreement" ); + + public static final OntClass all = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@all" ); + + public static final OntClass almost = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@almost" ); + + public static final OntClass along = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@along" ); + + public static final OntClass also = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@also" ); + + public static final OntClass although = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@although" ); + + public static final OntClass among = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@among" ); + + public static final OntClass and_CLASS = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@and" ); + + public static final OntClass anger = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@anger" ); + + public static final OntClass angle_bracket = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@angle_bracket" ); + + public static final OntClass anterior = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@anterior" ); + + public static final OntClass anthropomorphism = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@anthropomorphism" ); + + public static final OntClass antiphrasis = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@antiphrasis" ); + + public static final OntClass antonomasia = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@antonomasia" ); + + public static final OntClass any = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@any" ); + + public static final OntClass archaic = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@archaic" ); + + public static final OntClass around = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@around" ); + + public static final OntClass as = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@as" ); + + public static final OntClass if_ = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@as.@if" ); + + public static final OntClass as_far_as = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@as_far_as" ); + + public static final OntClass as_of = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@as_of" ); + + public static final OntClass as_per = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@as_per" ); + + public static final OntClass as_regards = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@as_regards" ); + + public static final OntClass as_well_as = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@as_well_as" ); + + public static final OntClass assertion = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@assertion" ); + + public static final OntClass assumption = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@assumption" ); + + public static final OntClass at = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@at" ); + + public static final OntClass attention = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@attention" ); + + public static final OntClass back = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@back" ); + + public static final OntClass barring = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@barring" ); + + public static final OntClass because = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@because" ); + + public static final OntClass because_of = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@because_of" ); + + public static final OntClass before = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@before" ); + + public static final OntClass behind = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@behind" ); + + public static final OntClass belief = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@belief" ); + + public static final OntClass below = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@below" ); + + public static final OntClass beside = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@beside" ); + + public static final OntClass besides = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@besides" ); + + public static final OntClass between = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@between" ); + + public static final OntClass beyond = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@beyond" ); + + public static final OntClass both = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@both" ); + + public static final OntClass bottom = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@bottom" ); + + public static final OntClass brace = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@brace" ); + + public static final OntClass brachylogia = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@brachylogia" ); + + public static final OntClass but = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@but" ); + + public static final OntClass by = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@by" ); + + public static final OntClass by_means_of = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@by_means_of" ); + + public static final OntClass catachresis = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@catachresis" ); + + public static final OntClass causative = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@causative" ); + + public static final OntClass certain = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@certain" ); + + public static final OntClass chiasmus = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@chiasmus" ); + + public static final OntClass circa = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@circa" ); + + public static final OntClass climax = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@climax" ); + + public static final OntClass clockwise = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@clockwise" ); + + public static final OntClass colloquial = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@colloquial" ); + + public static final OntClass command = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@command" ); + + public static final OntClass comment = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@comment" ); + + public static final OntClass concerning = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@concerning" ); + + public static final OntClass conclusion = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@conclusion" ); + + public static final OntClass condition = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@condition" ); + + public static final OntClass confirmation = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@confirmation" ); + + public static final OntClass consent = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@consent" ); + + public static final OntClass consequence = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@consequence" ); + + public static final OntClass consonance = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@consonance" ); + + public static final OntClass contact = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@contact" ); + + public static final OntClass contentment = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@contentment" ); + + public static final OntClass continuative = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@continuative" ); + + public static final OntClass conviction = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@conviction" ); + + public static final OntClass decision = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@decision" ); + + public static final OntClass deduction = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@deduction" ); + + public static final OntClass def = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@def" ); + + public static final OntClass desire = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@desire" ); + + public static final OntClass despite = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@despite" ); + + public static final OntClass determination = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@determination" ); + + public static final OntClass dialect = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@dialect" ); + + public static final OntClass disagreement = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@disagreement" ); + + public static final OntClass discontentment = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@discontentment" ); + + public static final OntClass dissent = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@dissent" ); + + public static final OntClass distal = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@distal" ); + + public static final OntClass double_negative = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@double_negative" ); + + public static final OntClass double_parenthesis = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@double_parenthesis" ); + + public static final OntClass double_quote = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@double_quote" ); + + public static final OntClass doubt = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@doubt" ); + + public static final OntClass down = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@down" ); + + public static final OntClass dual = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@dual" ); + + public static final OntClass due_to = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@due_to" ); + + public static final OntClass during = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@during" ); + + public static final OntClass dysphemism = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@dysphemism" ); + + public static final OntClass each = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@each" ); + + public static final OntClass either = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@either" ); + + public static final OntClass ellipsis = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@ellipsis" ); + + public static final OntClass emphasis = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@emphasis" ); + + public static final OntClass enough = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@enough" ); + + public static final OntClass entire = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@entire" ); + + public static final OntClass entry = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@entry" ); + + public static final OntClass epanalepsis = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@epanalepsis" ); + + public static final OntClass epanorthosis = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@epanorthosis" ); + + public static final OntClass equal = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@equal" ); + + public static final OntClass equivalent = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@equivalent" ); + + public static final OntClass euphemism = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@euphemism" ); + + public static final OntClass even = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@even" ); + + public static final OntClass if__CLASS = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@even.@if" ); + + public static final OntClass except = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@except" ); + + public static final OntClass if__CLASS1 = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@except.@if" ); + + public static final OntClass except_for = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@except_for" ); + + public static final OntClass exclamation = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@exclamation" ); + + public static final OntClass excluding = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@excluding" ); + + public static final OntClass exhortation = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@exhortation" ); + + public static final OntClass expectation = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@expectation" ); + + public static final OntClass experiential = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@experiential" ); + + public static final OntClass extra = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@extra" ); + + public static final OntClass failing = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@failing" ); + + public static final OntClass familiar = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@familiar" ); + + public static final OntClass far = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@far" ); + + public static final OntClass fear = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@fear" ); + + public static final OntClass female = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@female" ); + + public static final OntClass focus = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@focus" ); + + public static final OntClass following = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@following" ); + + public static final OntClass for_ = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@for" ); + + public static final OntClass from = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@from" ); + + public static final OntClass front = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@front" ); + + public static final OntClass future = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@future" ); + + public static final OntClass generic = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@generic" ); + + public static final OntClass given = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@given" ); + + public static final OntClass habitual = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@habitual" ); + + public static final OntClass half = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@half" ); + + public static final OntClass hesitation = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@hesitation" ); + + public static final OntClass hope = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@hope" ); + + public static final OntClass hyperbole = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@hyperbole" ); + + public static final OntClass hypothesis = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@hypothesis" ); + + public static final OntClass if__CLASS2 = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@if" ); + + public static final OntClass only = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@if.@only" ); + + public static final OntClass imperfective = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@imperfective" ); + + public static final OntClass in = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@in" ); + + public static final OntClass in_accordance_with = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@in_accordance_with" ); + + public static final OntClass in_addition_to = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@in_addition_to" ); + + public static final OntClass in_case = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@in_case" ); + + public static final OntClass in_case_of = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@in_case_of" ); + + public static final OntClass in_favor_of = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@in_favor_of" ); + + public static final OntClass in_place_of = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@in_place_of" ); + + public static final OntClass in_spite_of = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@in_spite_of" ); + + public static final OntClass inceptive = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@inceptive" ); + + public static final OntClass inchoative = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@inchoative" ); + + public static final OntClass including = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@including" ); + + public static final OntClass indef = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@indef" ); + + public static final OntClass inferior = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@inferior" ); + + public static final OntClass inside = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@inside" ); + + public static final OntClass instead_of = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@instead_of" ); + + public static final OntClass intention = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@intention" ); + + public static final OntClass interrogation = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@interrogation" ); + + public static final OntClass interruption = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@interruption" ); + + public static final OntClass intimate = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@intimate" ); + + public static final OntClass invitation = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@invitation" ); + + public static final OntClass irony = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@irony" ); + + public static final OntClass iterative = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@iterative" ); + + public static final OntClass jargon = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@jargon" ); + + public static final OntClass judgement = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@judgement" ); + + public static final OntClass least = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@least" ); + + public static final OntClass left = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@left" ); + + public static final OntClass less = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@less" ); + + public static final OntClass like = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@like" ); + + public static final OntClass literary = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@literary" ); + + public static final OntClass majority = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@majority" ); + + public static final OntClass male = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@male" ); + + public static final OntClass maybe = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@maybe" ); + + public static final OntClass medial = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@medial" ); + + public static final OntClass metaphor = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@metaphor" ); + + public static final OntClass metonymy = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@metonymy" ); + + public static final OntClass minority = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@minority" ); + + public static final OntClass minus = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@minus" ); + + public static final OntClass more = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@more" ); + + public static final OntClass most = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@most" ); + + public static final OntClass multal = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@multal" ); + + public static final OntClass narrative = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@narrative" ); + + public static final OntClass near = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@near" ); + + public static final OntClass necessity = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@necessity" ); + + public static final OntClass neither = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@neither" ); + + public static final OntClass neutral = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@neutral" ); + + public static final OntClass no = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@no" ); + + public static final OntClass not = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@not" ); + + public static final OntClass notwithstanding = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@notwithstanding" ); + + public static final OntClass noun = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@noun" ); + + public static final OntClass obligation = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@obligation" ); + + public static final OntClass of = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@of" ); + + public static final OntClass off = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@off" ); + + public static final OntClass on = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@on" ); + + public static final OntClass on_account_of = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@on_account_of" ); + + public static final OntClass on_behalf_of = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@on_behalf_of" ); + + public static final OntClass only_CLASS = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@only" ); + + public static final OntClass onomatopoeia = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@onomatopoeia" ); + + public static final OntClass opinion = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@opinion" ); + + public static final OntClass opposite = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@opposite" ); + + public static final OntClass or_CLASS = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@or" ); + + public static final OntClass ordinal = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@ordinal" ); + + public static final OntClass other = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@other" ); + + public static final OntClass outside = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@outside" ); + + public static final OntClass over = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@over" ); + + public static final OntClass owing_to = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@owing_to" ); + + public static final OntClass own = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@own" ); + + public static final OntClass oxymoron = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@oxymoron" ); + + public static final OntClass pace = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@pace" ); + + public static final OntClass pain = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@pain" ); + + public static final OntClass paradox = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@paradox" ); + + public static final OntClass parallelism = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@parallelism" ); + + public static final OntClass parenthesis = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@parenthesis" ); + + public static final OntClass paronomasia = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@paronomasia" ); + + public static final OntClass part = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@part" ); + + public static final OntClass passive = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@passive" ); + + public static final OntClass past = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@past" ); + + public static final OntClass paucal = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@paucal" ); + + public static final OntClass pejorative = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@pejorative" ); + + public static final OntClass per_CLASS = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@per" ); + + public static final OntClass perfect = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@perfect" ); + + public static final OntClass perfective = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@perfective" ); + + public static final OntClass periphrasis = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@periphrasis" ); + + public static final OntClass permission = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@permission" ); + + public static final OntClass permissive = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@permissive" ); + + public static final OntClass persistent = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@persistent" ); + + public static final OntClass person = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@person" ); + + public static final OntClass pl = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@pl" ); + + public static final OntClass pleonasm = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@pleonasm" ); + + public static final OntClass plus = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@plus" ); + + public static final OntClass polite = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@polite" ); + + public static final OntClass polyptoton = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@polyptoton" ); + + public static final OntClass polysyndeton = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@polysyndeton" ); + + public static final OntClass possibility = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@possibility" ); + + public static final OntClass posterior = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@posterior" ); + + public static final OntClass prediction = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@prediction" ); + + public static final OntClass present = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@present" ); + + public static final OntClass presumption = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@presumption" ); + + public static final OntClass prior_to = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@prior_to" ); + + public static final OntClass probability = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@probability" ); + + public static final OntClass progressive = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@progressive" ); + + public static final OntClass prohibition = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@prohibition" ); + + public static final OntClass promise = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@promise" ); + + public static final OntClass prospective = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@prospective" ); + + public static final OntClass proximal = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@proximal" ); + + public static final OntClass pursuant_to = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@pursuant_to" ); + + public static final OntClass qua_CLASS = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@qua" ); + + public static final OntClass quadrual = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@quadrual" ); + + public static final OntClass recent = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@recent" ); + + public static final OntClass reciprocal = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@reciprocal" ); + + public static final OntClass reflexive = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@reflexive" ); + + public static final OntClass regarding = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@regarding" ); + + public static final OntClass regardless_of = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@regardless_of" ); + + public static final OntClass regret = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@regret" ); + + public static final OntClass relative = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@relative" ); + + public static final OntClass relief = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@relief" ); + + public static final OntClass remote = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@remote" ); + + public static final OntClass repetition = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@repetition" ); + + public static final OntClass request = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@request" ); + + public static final OntClass result = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@result" ); + + public static final OntClass reverential = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@reverential" ); + + public static final OntClass right = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@right" ); + + public static final OntClass round = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@round" ); + + public static final OntClass same = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@same" ); + + public static final OntClass save = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@save" ); + + public static final OntClass side = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@side" ); + + public static final OntClass since = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@since" ); + + public static final OntClass single_quote = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@single_quote" ); + + public static final OntClass singular = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@singular" ); + + public static final OntClass slang = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@slang" ); + + public static final OntClass so = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@so" ); + + public static final OntClass speculation = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@speculation" ); + + public static final OntClass speech = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@speech" ); + + public static final OntClass square_bracket = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@square_bracket" ); + + public static final OntClass subsequent_to = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@subsequent_to" ); + + public static final OntClass such = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@such" ); + + public static final OntClass suggestion = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@suggestion" ); + + public static final OntClass superior = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@superior" ); + + public static final OntClass surprise = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@surprise" ); + + public static final OntClass symploce = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@symploce" ); + + public static final OntClass synecdoche = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@synecdoche" ); + + public static final OntClass synesthesia = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@synesthesia" ); + + public static final OntClass taboo = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@taboo" ); + + public static final OntClass terminative = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@terminative" ); + + public static final OntClass than = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@than" ); + + public static final OntClass thanks_to = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@thanks_to" ); + + public static final OntClass that_of = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@that_of" ); + + public static final OntClass thing = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@thing" ); + + public static final OntClass threat = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@threat" ); + + public static final OntClass through = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@through" ); + + public static final OntClass throughout = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@throughout" ); + + public static final OntClass times = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@times" ); + + public static final OntClass title = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@title" ); + + public static final OntClass to = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@to" ); + + public static final OntClass top = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@top" ); + + public static final OntClass topic = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@topic" ); + + public static final OntClass towards = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@towards" ); + + public static final OntClass trial = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@trial" ); + + public static final OntClass tuple = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@tuple" ); + + public static final OntClass under = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@under" ); + + public static final OntClass unit = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@unit" ); + + public static final OntClass unless = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@unless" ); + + public static final OntClass unlike = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@unlike" ); + + public static final OntClass until = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@until" ); + + public static final OntClass up = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@up" ); + + public static final OntClass verb = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@verb" ); + + public static final OntClass versus = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@versus" ); + + public static final OntClass vocative = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@vocative" ); + + public static final OntClass warning = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@warning" ); + + public static final OntClass weariness = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@weariness" ); + + public static final OntClass wh = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@wh" ); + + public static final OntClass with = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@with" ); + + public static final OntClass with_regard_to = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@with_regard_to" ); + + public static final OntClass with_relation_to = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@with_relation_to" ); + + public static final OntClass with_respect_to = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@with_respect_to" ); + + public static final OntClass within = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@within" ); + + public static final OntClass without = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@without" ); + + public static final OntClass worth = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@worth" ); + + public static final OntClass yes = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@yes" ); + + public static final OntClass zoomorphism = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#@zoomorphism" ); + + public static final OntClass Schemes = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#Schemes" ); + + public static final OntClass Tropes = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#Tropes" ); + + public static final OntClass UNLKB_Node = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#UNLKB_Node" ); + + /** <p>Top concepts of a UNL Knoledge Base that shall not correspond to a UW.</p> */ + public static final OntClass UNLKB_Top_Concept = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#UNLKB_Top_Concept" ); + + /** <p>For more information about UNL Documents, see : http://www.unlweb.net/wiki/UNL_document</p> */ + public static final OntClass UNL_Document = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#UNL_Document" ); + + public static final OntClass UNL_Graph_Node = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#UNL_Graph_Node" ); + + public static final OntClass UNL_Node = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#UNL_Node" ); + + /** <p>For more information about UNL Paragraphs, see : http://www.unlweb.net/wiki/UNL_document</p> */ + public static final OntClass UNL_Paragraph = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#UNL_Paragraph" ); + + /** <p>For more information about UNL Scopes, see : http://www.unlweb.net/wiki/Scope + * The UNL representation is a hyper-graph, which means that it may consist of + * several interlinked or subordinate sub-graphs. These sub-graphs are represented + * as hyper-nodes and correspond roughly to the concept of dependent (subordinate) + * clauses, i.e., groups of words that consist of a subject (explicit or implied) + * and a predicate and which are embedded in a larger structure (the independent + * clause). They are used to define the boundaries between complex semantic entities + * being represented.</p> + */ + public static final OntClass UNL_Scope = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#UNL_Scope" ); + + /** <p>For mor information about UNL Sentences, see : http://www.unlweb.net/wiki/UNL_sentence + * UNL sentences, or UNL expressions, are sentences of UNL. They are hypergraphs + * made out of nodes (Universal Words) interlinked by binary semantic Universal + * Relations and modified by Universal Attributes. UNL sentences have been the + * basic unit of representation inside the UNL framework.</p> + */ + public static final OntClass UNL_Sentence = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#UNL_Sentence" ); + + /** <p>Sentences expressed in UNL can be organized in paragraphs and documents</p> */ + public static final OntClass UNL_Structure = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#UNL_Structure" ); + + public static final OntClass UW_Lexeme = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#UW_Lexeme" ); + + public static final OntClass UW_Occurrence = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#UW_Occurrence" ); + + /** <p>More informations about Universal Attributes here : http://www.unlweb.net/wiki/Universal_Attributes + * Classes in this hierarchy are informative. Universal attributes must be expressed + * as strings (label of the attribute) with datatype :att defined in this ontology. + * Universal Attributes are arcs linking a node to itself. In opposition to Universal + * Relations, they correspond to one-place predicates, i.e., functions that take + * a single argument. In UNL, attributes have been normally used to represent + * information conveyed by natural language grammatical categories (such as tense, + * mood, aspect, number, etc). The set of attributes, which is claimed to be + * universal, is defined in the UNL Specs and is not open to frequent additions.</p> + */ + public static final OntClass Universal_Attribute = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#Universal_Attribute" ); + + /** <p>For details abour UWs, see : http://www.unlweb.net/wiki/Universal_Words Universal + * Words, or simply UW's, are the words of UNL, and correspond to nodes - to + * be interlinked by Universal Relations and specified by Universal Attributes + * - in a UNL graph.</p> + */ + public static final OntClass Universal_Word = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#Universal_Word" ); + + public static final OntClass absolute_tense = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#absolute_tense" ); + + public static final OntClass animacy = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#animacy" ); + + public static final OntClass aspect = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#aspect" ); + + public static final OntClass comparative = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#comparative" ); + + public static final OntClass conventions = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#conventions" ); + + public static final OntClass degree = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#degree" ); + + public static final OntClass direction = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#direction" ); + + public static final OntClass emotions = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#emotions" ); + + public static final OntClass figure_of_speech = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#figure_of_speech" ); + + public static final OntClass gender = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#gender" ); + + public static final OntClass information_structure = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#information_structure" ); + + public static final OntClass lexical_category = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#lexical_category" ); + + public static final OntClass location = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#location" ); + + public static final OntClass manner = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#manner" ); + + public static final OntClass modality = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#modality" ); + + public static final OntClass nominal_attributes = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#nominal_attributes" ); + + public static final OntClass other_CLASS = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#other" ); + + public static final OntClass person_CLASS = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#person" ); + + public static final OntClass place = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#place" ); + + public static final OntClass polarity = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#polarity" ); + + public static final OntClass position = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#position" ); + + public static final OntClass positive = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#positive" ); + + public static final OntClass quantification = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#quantification" ); + + public static final OntClass register = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#register" ); + + public static final OntClass relative_tense = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#relative_tense" ); + + public static final OntClass social_deixis = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#social_deixis" ); + + public static final OntClass specification = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#specification" ); + + public static final OntClass superlative = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#superlative" ); + + public static final OntClass syntactic_structures = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#syntactic_structures" ); + + public static final OntClass time = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#time" ); + + public static final OntClass voice = M_MODEL.createClass( "https://unl.tetras-libre.fr/rdf/schema#voice" ); + + /** <p>More informations about Universal Attributes here : http://www.unlweb.net/wiki/Universal_Attributes + * You can also see the hierarchy and descriptions of available attributes as + * subclasses of the :Universal_Attributes class in this ontologies. Those classes + * are informative, as universal attributes must be expressed as strings with + * datatype :att here defined. Universal Attributes are arcs linking a node to + * itself. In opposition to Universal Relations, they correspond to one-place + * predicates, i.e., functions that take a single argument. In UNL, attributes + * have been normally used to represent information conveyed by natural language + * grammatical categories (such as tense, mood, aspect, number, etc). The set + * of attributes, which is claimed to be universal, is defined in the UNL Specs + * and is not open to frequent additions.</p> + */ + public static final Resource attribute = M_MODEL.createResource( "https://unl.tetras-libre.fr/rdf/schema#attribute" ); + +} diff --git a/rdf/src/main/java/VocabularyUnl.ttl b/rdf/src/main/java/VocabularyUnl.ttl new file mode 100644 index 0000000000000000000000000000000000000000..142ffb7f43a852f29277d5cf7c5b0b94c32c04f6 --- /dev/null +++ b/rdf/src/main/java/VocabularyUnl.ttl @@ -0,0 +1,2975 @@ +# baseURI: https://unl.tetras-libre.fr/rdf/schema +# imports: http://www.w3.org/2008/05/skos-xl + +@prefix : <https://unl.tetras-libre.fr/rdf/schema#> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix skos: <http://www.w3.org/2004/02/skos/core#> . +@prefix xml: <http://www.w3.org/XML/1998/namespace> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . + +<https://unl.tetras-libre.fr/rdf/schema> + rdf:type owl:Ontology ; + owl:imports <http://www.w3.org/2008/05/skos-xl> ; + owl:versionIRI <https://unl.tetras-libre.fr/rdf/schema#0.1> ; +. +<https://unl.tetras-libre.fr/rdf/schema#@1> + rdf:type owl:Class ; + rdfs:label "1" ; + rdfs:subClassOf :person ; + skos:definition "first person speaker" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@2> + rdf:type owl:Class ; + rdfs:label "2" ; + rdfs:subClassOf :person ; + skos:definition "second person addressee" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@3> + rdf:type owl:Class ; + rdfs:label "3" ; + rdfs:subClassOf :person ; + skos:definition "third person" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@ability> + rdf:type owl:Class ; + rdfs:label "ability" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@about> + rdf:type owl:Class ; + rdfs:label "about" ; + rdfs:subClassOf :nominal_attributes ; +. +<https://unl.tetras-libre.fr/rdf/schema#@above> + rdf:type owl:Class ; + rdfs:label "above" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@according_to> + rdf:type owl:Class ; + rdfs:label "according to" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@across> + rdf:type owl:Class ; + rdfs:label "across" ; + rdfs:subClassOf :direction ; +. +<https://unl.tetras-libre.fr/rdf/schema#@active> + rdf:type owl:Class ; + rdfs:label "active" ; + rdfs:subClassOf :voice ; + skos:definition "He built this house in 1895" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@adjective> + rdf:type owl:Class ; + rdfs:label "adjective" ; + rdfs:subClassOf :lexical_category ; +. +<https://unl.tetras-libre.fr/rdf/schema#@adverb> + rdf:type owl:Class ; + rdfs:label "adverb" ; + rdfs:subClassOf :lexical_category ; +. +<https://unl.tetras-libre.fr/rdf/schema#@advice> + rdf:type owl:Class ; + rdfs:label "advice" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@after> + rdf:type owl:Class ; + rdfs:label "after" ; + rdfs:subClassOf :other ; +. +<https://unl.tetras-libre.fr/rdf/schema#@again> + rdf:type owl:Class ; + rdfs:label "again" ; + rdfs:subClassOf :positive ; + skos:definition "iterative" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@against> + rdf:type owl:Class ; + rdfs:label "against" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@agreement> + rdf:type owl:Class ; + rdfs:label "agreement" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@all> + rdf:type owl:Class ; + rdfs:label "all" ; + rdfs:subClassOf :quantification ; + skos:definition "universal quantifier" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@almost> + rdf:type owl:Class ; + rdfs:label "almost" ; + rdfs:subClassOf :degree ; + skos:definition "approximative" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@along> + rdf:type owl:Class ; + rdfs:label "along" ; + rdfs:subClassOf :direction ; +. +<https://unl.tetras-libre.fr/rdf/schema#@also> + rdf:type owl:Class ; + rdfs:label "also" ; + rdfs:subClassOf :degree ; + rdfs:subClassOf :specification ; + skos:definition "repetitive" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@although> + rdf:type owl:Class ; + rdfs:label "although" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@among> + rdf:type owl:Class ; + rdfs:label "among" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@and> + rdf:type owl:Class ; + rdfs:label "and" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@anger> + rdf:type owl:Class ; + rdfs:label "anger" ; + rdfs:subClassOf :emotions ; +. +<https://unl.tetras-libre.fr/rdf/schema#@angle_bracket> + rdf:type owl:Class ; + rdfs:label "angle bracket" ; + rdfs:subClassOf :conventions ; +. +<https://unl.tetras-libre.fr/rdf/schema#@anterior> + rdf:type owl:Class ; + rdfs:label "anterior" ; + rdfs:subClassOf :relative_tense ; + skos:definition "before some other time other than the time of utterance" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@anthropomorphism> + rdf:type owl:Class ; + rdfs:label "anthropomorphism" ; + rdfs:subClassOf :Tropes ; + skos:definition "Ascribing human characteristics to something that is not human, such as an animal or a god (see zoomorphism)" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@antiphrasis> + rdf:type owl:Class ; + rdfs:label "antiphrasis" ; + rdfs:subClassOf :Tropes ; + skos:definition "Word or words used contradictory to their usual meaning, often with irony" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@antonomasia> + rdf:type owl:Class ; + rdfs:label "antonomasia" ; + rdfs:subClassOf :Tropes ; + skos:definition "Substitution of a phrase for a proper name or vice versa" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@any> + rdf:type owl:Class ; + rdfs:label "any" ; + rdfs:subClassOf :quantification ; + skos:definition "existential quantifier" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@archaic> + rdf:type owl:Class ; + rdfs:label "archaic" ; + rdfs:subClassOf :register ; +. +<https://unl.tetras-libre.fr/rdf/schema#@around> + rdf:type owl:Class ; + rdfs:label "around" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@as> + rdf:type owl:Class ; + rdfs:label "as" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@as.@if> + rdf:type owl:Class ; + rdfs:label "as.@if" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@as_far_as> + rdf:type owl:Class ; + rdfs:label "as far as" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@as_of> + rdf:type owl:Class ; + rdfs:label "as of" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@as_per> + rdf:type owl:Class ; + rdfs:label "as per" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@as_regards> + rdf:type owl:Class ; + rdfs:label "as regards" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@as_well_as> + rdf:type owl:Class ; + rdfs:label "as well as" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@assertion> + rdf:type owl:Class ; + rdfs:label "assertion" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@assumption> + rdf:type owl:Class ; + rdfs:label "assumption" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@at> + rdf:type owl:Class ; + rdfs:label "at" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@attention> + rdf:type owl:Class ; + rdfs:label "attention" ; + rdfs:subClassOf :emotions ; +. +<https://unl.tetras-libre.fr/rdf/schema#@back> + rdf:type owl:Class ; + rdfs:label "back" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@barring> + rdf:type owl:Class ; + rdfs:label "barring" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@because> + rdf:type owl:Class ; + rdfs:label "because" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@because_of> + rdf:type owl:Class ; + rdfs:label "because of" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@before> + rdf:type owl:Class ; + rdfs:label "before" ; + rdfs:subClassOf :other ; +. +<https://unl.tetras-libre.fr/rdf/schema#@behind> + rdf:type owl:Class ; + rdfs:label "behind" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@belief> + rdf:type owl:Class ; + rdfs:label "belief" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@below> + rdf:type owl:Class ; + rdfs:label "below" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@beside> + rdf:type owl:Class ; + rdfs:label "beside" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@besides> + rdf:type owl:Class ; + rdfs:label "besides" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@between> + rdf:type owl:Class ; + rdfs:label "between" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@beyond> + rdf:type owl:Class ; + rdfs:label "beyond" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@both> + rdf:type owl:Class ; + rdfs:label "both" ; + rdfs:subClassOf <https://unl.tetras-libre.fr/rdf/schema#@def> ; +. +<https://unl.tetras-libre.fr/rdf/schema#@bottom> + rdf:type owl:Class ; + rdfs:label "bottom" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@brace> + rdf:type owl:Class ; + rdfs:label "brace" ; + rdfs:subClassOf :conventions ; +. +<https://unl.tetras-libre.fr/rdf/schema#@brachylogia> + rdf:type owl:Class ; + rdfs:label "brachylogia" ; + rdfs:subClassOf :Schemes ; + skos:definition "omission of conjunctions between a series of words" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@but> + rdf:type owl:Class ; + rdfs:label "but" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@by> + rdf:type owl:Class ; + rdfs:label "by" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@by_means_of> + rdf:type owl:Class ; + rdfs:label "by means of" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@catachresis> + rdf:type owl:Class ; + rdfs:label "catachresis" ; + rdfs:subClassOf :Tropes ; + skos:definition "use an existing word to denote something that has no name in the current language" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@causative> + rdf:type owl:Class ; + rdfs:label "causative" ; + rdfs:subClassOf :aspect ; + skos:definition "causative" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@certain> + rdf:type owl:Class ; + rdfs:label "certain" ; + rdfs:subClassOf <https://unl.tetras-libre.fr/rdf/schema#@indef> ; +. +<https://unl.tetras-libre.fr/rdf/schema#@chiasmus> + rdf:type owl:Class ; + rdfs:label "chiasmus" ; + rdfs:subClassOf :Schemes ; + skos:definition "reversal of grammatical structures in successive clauses" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@circa> + rdf:type owl:Class ; + rdfs:label "circa" ; + rdfs:subClassOf :specification ; +. +<https://unl.tetras-libre.fr/rdf/schema#@climax> + rdf:type owl:Class ; + rdfs:label "climax" ; + rdfs:subClassOf :Schemes ; + skos:definition "arrangement of words in order of increasing importance" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@clockwise> + rdf:type owl:Class ; + rdfs:label "clockwise" ; + rdfs:subClassOf :direction ; +. +<https://unl.tetras-libre.fr/rdf/schema#@colloquial> + rdf:type owl:Class ; + rdfs:label "colloquial" ; + rdfs:subClassOf :register ; +. +<https://unl.tetras-libre.fr/rdf/schema#@command> + rdf:type owl:Class ; + rdfs:label "command" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@comment> + rdf:type owl:Class ; + rdfs:label "comment" ; + rdfs:subClassOf :information_structure ; + skos:definition "what is being said about the topic" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@concerning> + rdf:type owl:Class ; + rdfs:label "concerning" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@conclusion> + rdf:type owl:Class ; + rdfs:label "conclusion" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@condition> + rdf:type owl:Class ; + rdfs:label "condition" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@confirmation> + rdf:type owl:Class ; + rdfs:label "confirmation" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@consent> + rdf:type owl:Class ; + rdfs:label "consent" ; + rdfs:subClassOf :emotions ; +. +<https://unl.tetras-libre.fr/rdf/schema#@consequence> + rdf:type owl:Class ; + rdfs:label "consequence" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@consonance> + rdf:type owl:Class ; + rdfs:label "consonance" ; + rdfs:subClassOf :Schemes ; + skos:definition "repetition of consonant sounds without the repetition of the vowel sounds" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@contact> + rdf:type owl:Class ; + rdfs:label "contact" ; + rdfs:subClassOf :position ; +. +<https://unl.tetras-libre.fr/rdf/schema#@contentment> + rdf:type owl:Class ; + rdfs:label "contentment" ; + rdfs:subClassOf :emotions ; +. +<https://unl.tetras-libre.fr/rdf/schema#@continuative> + rdf:type owl:Class ; + rdfs:label "continuative" ; + rdfs:subClassOf :aspect ; + skos:definition "continuous" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@conviction> + rdf:type owl:Class ; + rdfs:label "conviction" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@decision> + rdf:type owl:Class ; + rdfs:label "decision" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@deduction> + rdf:type owl:Class ; + rdfs:label "deduction" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@def> + rdf:type owl:Class ; + rdfs:label "def" ; + rdfs:subClassOf :specification ; + skos:definition "definite" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@desire> + rdf:type owl:Class ; + rdfs:label "desire" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@despite> + rdf:type owl:Class ; + rdfs:label "despite" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@determination> + rdf:type owl:Class ; + rdfs:label "determination" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@dialect> + rdf:type owl:Class ; + rdfs:label "dialect" ; + rdfs:subClassOf :register ; +. +<https://unl.tetras-libre.fr/rdf/schema#@disagreement> + rdf:type owl:Class ; + rdfs:label "disagreement" ; + rdfs:subClassOf :emotions ; +. +<https://unl.tetras-libre.fr/rdf/schema#@discontentment> + rdf:type owl:Class ; + rdfs:label "discontentment" ; + rdfs:subClassOf :emotions ; +. +<https://unl.tetras-libre.fr/rdf/schema#@dissent> + rdf:type owl:Class ; + rdfs:label "dissent" ; + rdfs:subClassOf :emotions ; +. +<https://unl.tetras-libre.fr/rdf/schema#@distal> + rdf:type owl:Class ; + rdfs:label "distal" ; + rdfs:subClassOf <https://unl.tetras-libre.fr/rdf/schema#@def> ; + skos:definition "far from the speaker" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@double_negative> + rdf:type owl:Class ; + rdfs:label "double negative" ; + rdfs:subClassOf :Tropes ; + skos:definition "Grammar construction that can be used as an expression and it is the repetition of negative words" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@double_parenthesis> + rdf:type owl:Class ; + rdfs:label "double parenthesis" ; + rdfs:subClassOf :conventions ; +. +<https://unl.tetras-libre.fr/rdf/schema#@double_quote> + rdf:type owl:Class ; + rdfs:label "double quote" ; + rdfs:subClassOf :conventions ; +. +<https://unl.tetras-libre.fr/rdf/schema#@doubt> + rdf:type owl:Class ; + rdfs:label "doubt" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@down> + rdf:type owl:Class ; + rdfs:label "down" ; + rdfs:subClassOf :direction ; +. +<https://unl.tetras-libre.fr/rdf/schema#@dual> + rdf:type owl:Class ; + rdfs:label "dual" ; + rdfs:subClassOf <https://unl.tetras-libre.fr/rdf/schema#@pl> ; +. +<https://unl.tetras-libre.fr/rdf/schema#@due_to> + rdf:type owl:Class ; + rdfs:label "due to" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@during> + rdf:type owl:Class ; + rdfs:label "during" ; + rdfs:subClassOf :other ; +. +<https://unl.tetras-libre.fr/rdf/schema#@dysphemism> + rdf:type owl:Class ; + rdfs:label "dysphemism" ; + rdfs:subClassOf :Tropes ; + skos:definition "Substitution of a harsher, more offensive, or more disagreeable term for another. Opposite of euphemism" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@each> + rdf:type owl:Class ; + rdfs:label "each" ; + rdfs:subClassOf <https://unl.tetras-libre.fr/rdf/schema#@def> ; +. +<https://unl.tetras-libre.fr/rdf/schema#@either> + rdf:type owl:Class ; + rdfs:label "either" ; + rdfs:subClassOf <https://unl.tetras-libre.fr/rdf/schema#@def> ; +. +<https://unl.tetras-libre.fr/rdf/schema#@ellipsis> + rdf:type owl:Class ; + rdfs:label "ellipsis" ; + rdfs:subClassOf :Schemes ; + skos:definition "omission of words" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@emphasis> + rdf:type owl:Class ; + rdfs:label "emphasis" ; + rdfs:subClassOf :positive ; + skos:definition "emphasis" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@enough> + rdf:type owl:Class ; + rdfs:label "enough" ; + rdfs:subClassOf :positive ; + skos:definition "sufficiently (enough)" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@entire> + rdf:type owl:Class ; + rdfs:label "entire" ; + rdfs:subClassOf :quantification ; +. +<https://unl.tetras-libre.fr/rdf/schema#@entry> + rdf:type owl:Class ; + rdfs:label "entry" ; + rdfs:subClassOf :syntactic_structures ; + skos:definition "sentence head" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@epanalepsis> + rdf:type owl:Class ; + rdfs:label "epanalepsis" ; + rdfs:subClassOf :Schemes ; + skos:definition "repetition of the initial word or words of a clause or sentence at the end of the clause or sentence" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@epanorthosis> + rdf:type owl:Class ; + rdfs:label "epanorthosis" ; + rdfs:subClassOf :Tropes ; + skos:definition "Immediate and emphatic self-correction, often following a slip of the tongue" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@equal> + rdf:type owl:Class ; + rdfs:label "equal" ; + rdfs:subClassOf :comparative ; + skos:definition "comparative of equality" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@equivalent> + rdf:type owl:Class ; + rdfs:label "equivalent" ; + rdfs:subClassOf :social_deixis ; +. +<https://unl.tetras-libre.fr/rdf/schema#@euphemism> + rdf:type owl:Class ; + rdfs:label "euphemism" ; + rdfs:subClassOf :Tropes ; + skos:definition "Substitution of a less offensive or more agreeable term for another" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@even> + rdf:type owl:Class ; + rdfs:label "even" ; + rdfs:subClassOf :specification ; +. +<https://unl.tetras-libre.fr/rdf/schema#@even.@if> + rdf:type owl:Class ; + rdfs:label "even.@if" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@except> + rdf:type owl:Class ; + rdfs:label "except" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@except.@if> + rdf:type owl:Class ; + rdfs:label "except.@if" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@except_for> + rdf:type owl:Class ; + rdfs:label "except for" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@exclamation> + rdf:type owl:Class ; + rdfs:label "exclamation" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@excluding> + rdf:type owl:Class ; + rdfs:label "excluding" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@exhortation> + rdf:type owl:Class ; + rdfs:label "exhortation" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@expectation> + rdf:type owl:Class ; + rdfs:label "expectation" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@experiential> + rdf:type owl:Class ; + rdfs:label "experiential" ; + rdfs:subClassOf :aspect ; + skos:definition "experience" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@extra> + rdf:type owl:Class ; + rdfs:label "extra" ; + rdfs:subClassOf :positive ; + skos:definition "excessively (too)" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@failing> + rdf:type owl:Class ; + rdfs:label "failing" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@familiar> + rdf:type owl:Class ; + rdfs:label "familiar" ; + rdfs:subClassOf :social_deixis ; +. +<https://unl.tetras-libre.fr/rdf/schema#@far> + rdf:type owl:Class ; + rdfs:label "far" ; + rdfs:subClassOf :position ; +. +<https://unl.tetras-libre.fr/rdf/schema#@fear> + rdf:type owl:Class ; + rdfs:label "fear" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@female> + rdf:type owl:Class ; + rdfs:label "female" ; + rdfs:subClassOf :gender ; +. +<https://unl.tetras-libre.fr/rdf/schema#@focus> + rdf:type owl:Class ; + rdfs:label "focus" ; + rdfs:subClassOf :information_structure ; + skos:definition "information that is contrary to the presuppositions of the interlocutor" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@following> + rdf:type owl:Class ; + rdfs:label "following" ; + rdfs:subClassOf :other ; +. +<https://unl.tetras-libre.fr/rdf/schema#@for> + rdf:type owl:Class ; + rdfs:label "for" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@from> + rdf:type owl:Class ; + rdfs:label "from" ; + rdfs:subClassOf :direction ; +. +<https://unl.tetras-libre.fr/rdf/schema#@front> + rdf:type owl:Class ; + rdfs:label "front" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@future> + rdf:type owl:Class ; + rdfs:label "future" ; + rdfs:subClassOf :absolute_tense ; + skos:definition "at a time after the moment of utterance" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@generic> + rdf:type owl:Class ; + rdfs:label "generic" ; + rdfs:subClassOf :quantification ; + skos:definition "no quantification" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@given> + rdf:type owl:Class ; + rdfs:label "given" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@habitual> + rdf:type owl:Class ; + rdfs:label "habitual" ; + rdfs:subClassOf :aspect ; + skos:definition "habitual" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@half> + rdf:type owl:Class ; + rdfs:label "half" ; + rdfs:subClassOf :quantification ; +. +<https://unl.tetras-libre.fr/rdf/schema#@hesitation> + rdf:type owl:Class ; + rdfs:label "hesitation" ; + rdfs:subClassOf :emotions ; +. +<https://unl.tetras-libre.fr/rdf/schema#@hope> + rdf:type owl:Class ; + rdfs:label "hope" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@hyperbole> + rdf:type owl:Class ; + rdfs:label "hyperbole" ; + rdfs:subClassOf :Tropes ; + skos:definition "Use of exaggerated terms for emphasis" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@hypothesis> + rdf:type owl:Class ; + rdfs:label "hypothesis" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@if> + rdf:type owl:Class ; + rdfs:label "if" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@if.@only> + rdf:type owl:Class ; + rdfs:label "if.@only" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@imperfective> + rdf:type owl:Class ; + rdfs:label "imperfective" ; + rdfs:subClassOf :aspect ; + skos:definition "uncompleted" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@in> + rdf:type owl:Class ; + rdfs:label "in" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@in_accordance_with> + rdf:type owl:Class ; + rdfs:label "in accordance with" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@in_addition_to> + rdf:type owl:Class ; + rdfs:label "in addition to" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@in_case> + rdf:type owl:Class ; + rdfs:label "in case" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@in_case_of> + rdf:type owl:Class ; + rdfs:label "in case of" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@in_favor_of> + rdf:type owl:Class ; + rdfs:label "in favor of" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@in_place_of> + rdf:type owl:Class ; + rdfs:label "in place of" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@in_spite_of> + rdf:type owl:Class ; + rdfs:label "in spite of" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@inceptive> + rdf:type owl:Class ; + rdfs:label "inceptive" ; + rdfs:subClassOf :aspect ; + skos:definition "beginning" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@inchoative> + rdf:type owl:Class ; + rdfs:label "inchoative" ; + rdfs:subClassOf :aspect ; + skos:definition "change of state" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@including> + rdf:type owl:Class ; + rdfs:label "including" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@indef> + rdf:type owl:Class ; + rdfs:label "indef" ; + rdfs:subClassOf :specification ; + skos:definition "indefinite" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@inferior> + rdf:type owl:Class ; + rdfs:label "inferior" ; + rdfs:subClassOf :social_deixis ; +. +<https://unl.tetras-libre.fr/rdf/schema#@inside> + rdf:type owl:Class ; + rdfs:label "inside" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@instead_of> + rdf:type owl:Class ; + rdfs:label "instead of" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@intention> + rdf:type owl:Class ; + rdfs:label "intention" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@interrogation> + rdf:type owl:Class ; + rdfs:label "interrogation" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@interruption> + rdf:type owl:Class ; + rdfs:label "interruption" ; + rdfs:subClassOf :Schemes ; + skos:definition "insertion of a clause or sentence in a place where it interrupts the natural flow of the sentence" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@intimate> + rdf:type owl:Class ; + rdfs:label "intimate" ; + rdfs:subClassOf :social_deixis ; +. +<https://unl.tetras-libre.fr/rdf/schema#@invitation> + rdf:type owl:Class ; + rdfs:label "invitation" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@irony> + rdf:type owl:Class ; + rdfs:label "irony" ; + rdfs:subClassOf :Tropes ; + skos:definition "Use of word in a way that conveys a meaning opposite to its usual meaning" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@iterative> + rdf:type owl:Class ; + rdfs:label "iterative" ; + rdfs:subClassOf :aspect ; + skos:definition "repetition" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@jargon> + rdf:type owl:Class ; + rdfs:label "jargon" ; + rdfs:subClassOf :register ; +. +<https://unl.tetras-libre.fr/rdf/schema#@judgement> + rdf:type owl:Class ; + rdfs:label "judgement" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@least> + rdf:type owl:Class ; + rdfs:label "least" ; + rdfs:subClassOf :superlative ; + skos:definition "superlative of inferiority" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@left> + rdf:type owl:Class ; + rdfs:label "left" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@less> + rdf:type owl:Class ; + rdfs:label "less" ; + rdfs:subClassOf :comparative ; + skos:definition "comparative of inferiority" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@like> + rdf:type owl:Class ; + rdfs:label "like" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@literary> + rdf:type owl:Class ; + rdfs:label "literary" ; + rdfs:subClassOf :register ; +. +<https://unl.tetras-libre.fr/rdf/schema#@majority> + rdf:type owl:Class ; + rdfs:label "majority" ; + rdfs:subClassOf :quantification ; + skos:definition "a major part" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@male> + rdf:type owl:Class ; + rdfs:label "male" ; + rdfs:subClassOf :gender ; +. +<https://unl.tetras-libre.fr/rdf/schema#@maybe> + rdf:type owl:Class ; + rdfs:label "maybe" ; + rdfs:subClassOf :polarity ; + skos:definition "dubitative" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@medial> + rdf:type owl:Class ; + rdfs:label "medial" ; + rdfs:subClassOf <https://unl.tetras-libre.fr/rdf/schema#@def> ; + skos:definition "near the addressee" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@metaphor> + rdf:type owl:Class ; + rdfs:label "metaphor" ; + rdfs:subClassOf :Tropes ; + skos:definition "Stating one entity is another for the purpose of comparing them in quality" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@metonymy> + rdf:type owl:Class ; + rdfs:label "metonymy" ; + rdfs:subClassOf :Tropes ; + skos:definition "Substitution of a word to suggest what is really meant" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@minority> + rdf:type owl:Class ; + rdfs:label "minority" ; + rdfs:subClassOf :quantification ; + skos:definition "a minor part" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@minus> + rdf:type owl:Class ; + rdfs:label "minus" ; + rdfs:subClassOf :positive ; + skos:definition "downtoned (a little)" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@more> + rdf:type owl:Class ; + rdfs:label "more" ; + rdfs:subClassOf :comparative ; + skos:definition "comparative of superiority" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@most> + rdf:type owl:Class ; + rdfs:label "most" ; + rdfs:subClassOf :superlative ; + skos:definition "superlative of superiority" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@multal> + rdf:type owl:Class ; + rdfs:label "multal" ; + rdfs:subClassOf <https://unl.tetras-libre.fr/rdf/schema#@pl> ; +. +<https://unl.tetras-libre.fr/rdf/schema#@narrative> + rdf:type owl:Class ; + rdfs:label "narrative" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@near> + rdf:type owl:Class ; + rdfs:label "near" ; + rdfs:subClassOf :position ; +. +<https://unl.tetras-libre.fr/rdf/schema#@necessity> + rdf:type owl:Class ; + rdfs:label "necessity" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@neither> + rdf:type owl:Class ; + rdfs:label "neither" ; + rdfs:subClassOf :specification ; +. +<https://unl.tetras-libre.fr/rdf/schema#@neutral> + rdf:type owl:Class ; + rdfs:label "neutral" ; + rdfs:subClassOf :gender ; +. +<https://unl.tetras-libre.fr/rdf/schema#@no> + rdf:type owl:Class ; + rdfs:label "no" ; + rdfs:subClassOf :quantification ; + skos:definition "none" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@not> + rdf:type owl:Class ; + rdfs:label "not" ; + rdfs:subClassOf :polarity ; + skos:definition "negative" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@notwithstanding> + rdf:type owl:Class ; + rdfs:label "notwithstanding" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@noun> + rdf:type owl:Class ; + rdfs:label "noun" ; + rdfs:subClassOf :lexical_category ; +. +<https://unl.tetras-libre.fr/rdf/schema#@obligation> + rdf:type owl:Class ; + rdfs:label "obligation" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@of> + rdf:type owl:Class ; + rdfs:label "of" ; + rdfs:subClassOf :nominal_attributes ; +. +<https://unl.tetras-libre.fr/rdf/schema#@off> + rdf:type owl:Class ; + rdfs:label "off" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@on> + rdf:type owl:Class ; + rdfs:label "on" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@on_account_of> + rdf:type owl:Class ; + rdfs:label "on account of" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@on_behalf_of> + rdf:type owl:Class ; + rdfs:label "on behalf of" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@only> + rdf:type owl:Class ; + rdfs:label "only" ; + rdfs:subClassOf :specification ; +. +<https://unl.tetras-libre.fr/rdf/schema#@onomatopoeia> + rdf:type owl:Class ; + rdfs:label "onomatopoeia" ; + rdfs:subClassOf :Tropes ; + skos:definition "Words that sound like their meaning" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@opinion> + rdf:type owl:Class ; + rdfs:label "opinion" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@opposite> + rdf:type owl:Class ; + rdfs:label "opposite" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@or> + rdf:type owl:Class ; + rdfs:label "or" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@ordinal> + rdf:type owl:Class ; + rdfs:label "ordinal" ; + rdfs:subClassOf :specification ; +. +<https://unl.tetras-libre.fr/rdf/schema#@other> + rdf:type owl:Class ; + rdfs:label "other" ; + rdfs:subClassOf <https://unl.tetras-libre.fr/rdf/schema#@def> ; +. +<https://unl.tetras-libre.fr/rdf/schema#@outside> + rdf:type owl:Class ; + rdfs:label "outside" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@over> + rdf:type owl:Class ; + rdfs:label "over" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@owing_to> + rdf:type owl:Class ; + rdfs:label "owing to" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@own> + rdf:type owl:Class ; + rdfs:label "own" ; + rdfs:subClassOf <https://unl.tetras-libre.fr/rdf/schema#@def> ; +. +<https://unl.tetras-libre.fr/rdf/schema#@oxymoron> + rdf:type owl:Class ; + rdfs:label "oxymoron" ; + rdfs:subClassOf :Tropes ; + skos:definition "Using two terms together, that normally contradict each other" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@pace> + rdf:type owl:Class ; + rdfs:label "pace" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@pain> + rdf:type owl:Class ; + rdfs:label "pain" ; + rdfs:subClassOf :emotions ; +. +<https://unl.tetras-libre.fr/rdf/schema#@paradox> + rdf:type owl:Class ; + rdfs:label "paradox" ; + rdfs:subClassOf :Tropes ; + skos:definition "Use of apparently contradictory ideas to point out some underlying truth" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@parallelism> + rdf:type owl:Class ; + rdfs:label "parallelism" ; + rdfs:subClassOf :Schemes ; + skos:definition "use of similar structures in two or more clauses" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@parenthesis> + rdf:type owl:Class ; + rdfs:label "parenthesis" ; + rdfs:subClassOf :conventions ; +. +<https://unl.tetras-libre.fr/rdf/schema#@paronomasia> + rdf:type owl:Class ; + rdfs:label "paronomasia" ; + rdfs:subClassOf :Tropes ; + skos:definition "A form of pun, in which words similar in sound but with different meanings are used" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@part> + rdf:type owl:Class ; + rdfs:label "part" ; + rdfs:subClassOf :quantification ; +. +<https://unl.tetras-libre.fr/rdf/schema#@passive> + rdf:type owl:Class ; + rdfs:label "passive" ; + rdfs:subClassOf :voice ; + skos:definition "This house was built in 1895." ; +. +<https://unl.tetras-libre.fr/rdf/schema#@past> + rdf:type owl:Class ; + rdfs:label "past" ; + rdfs:subClassOf :absolute_tense ; + skos:definition "at a time before the moment of utterance" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@paucal> + rdf:type owl:Class ; + rdfs:label "paucal" ; + rdfs:subClassOf <https://unl.tetras-libre.fr/rdf/schema#@pl> ; +. +<https://unl.tetras-libre.fr/rdf/schema#@pejorative> + rdf:type owl:Class ; + rdfs:label "pejorative" ; + rdfs:subClassOf :register ; +. +<https://unl.tetras-libre.fr/rdf/schema#@per> + rdf:type owl:Class ; + rdfs:label "per" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@perfect> + rdf:type owl:Class ; + rdfs:label "perfect" ; + rdfs:subClassOf :aspect ; + skos:definition "perfect" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@perfective> + rdf:type owl:Class ; + rdfs:label "perfective" ; + rdfs:subClassOf :aspect ; + skos:definition "completed" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@periphrasis> + rdf:type owl:Class ; + rdfs:label "periphrasis" ; + rdfs:subClassOf :Tropes ; + skos:definition "Using several words instead of few" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@permission> + rdf:type owl:Class ; + rdfs:label "permission" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@permissive> + rdf:type owl:Class ; + rdfs:label "permissive" ; + rdfs:subClassOf :aspect ; + skos:definition "permissive" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@persistent> + rdf:type owl:Class ; + rdfs:label "persistent" ; + rdfs:subClassOf :aspect ; + skos:definition "persistent" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@person> + rdf:type owl:Class ; + rdfs:label "person" ; + rdfs:subClassOf :animacy ; +. +<https://unl.tetras-libre.fr/rdf/schema#@pl> + rdf:type owl:Class ; + rdfs:label "pl" ; + rdfs:subClassOf :quantification ; + skos:definition "plural" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@pleonasm> + rdf:type owl:Class ; + rdfs:label "pleonasm" ; + rdfs:subClassOf :Schemes ; + skos:definition "Use of superfluous or redundant words" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@plus> + rdf:type owl:Class ; + rdfs:label "plus" ; + rdfs:subClassOf :positive ; + skos:definition "intensified (very)" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@polite> + rdf:type owl:Class ; + rdfs:label "polite" ; + rdfs:subClassOf :social_deixis ; +. +<https://unl.tetras-libre.fr/rdf/schema#@polyptoton> + rdf:type owl:Class ; + rdfs:label "polyptoton" ; + rdfs:subClassOf :Schemes ; + skos:definition "repetition of words derived from the same root" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@polysyndeton> + rdf:type owl:Class ; + rdfs:label "polysyndeton" ; + rdfs:subClassOf :Schemes ; + skos:definition "repetition of conjunctions" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@possibility> + rdf:type owl:Class ; + rdfs:label "possibility" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@posterior> + rdf:type owl:Class ; + rdfs:label "posterior" ; + rdfs:subClassOf :relative_tense ; + skos:definition "after some other time other than the time of utterance" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@prediction> + rdf:type owl:Class ; + rdfs:label "prediction" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@present> + rdf:type owl:Class ; + rdfs:label "present" ; + rdfs:subClassOf :absolute_tense ; + skos:definition "at the moment of utterance" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@presumption> + rdf:type owl:Class ; + rdfs:label "presumption" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@prior_to> + rdf:type owl:Class ; + rdfs:label "prior to" ; + rdfs:subClassOf :other ; +. +<https://unl.tetras-libre.fr/rdf/schema#@probability> + rdf:type owl:Class ; + rdfs:label "probability" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@progressive> + rdf:type owl:Class ; + rdfs:label "progressive" ; + rdfs:subClassOf :aspect ; + skos:definition "ongoing" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@prohibition> + rdf:type owl:Class ; + rdfs:label "prohibition" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@promise> + rdf:type owl:Class ; + rdfs:label "promise" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@prospective> + rdf:type owl:Class ; + rdfs:label "prospective" ; + rdfs:subClassOf :aspect ; + skos:definition "imminent" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@proximal> + rdf:type owl:Class ; + rdfs:label "proximal" ; + rdfs:subClassOf <https://unl.tetras-libre.fr/rdf/schema#@def> ; + skos:definition "near the speaker" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@pursuant_to> + rdf:type owl:Class ; + rdfs:label "pursuant to" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@qua> + rdf:type owl:Class ; + rdfs:label "qua" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@quadrual> + rdf:type owl:Class ; + rdfs:label "quadrual" ; + rdfs:subClassOf <https://unl.tetras-libre.fr/rdf/schema#@pl> ; +. +<https://unl.tetras-libre.fr/rdf/schema#@recent> + rdf:type owl:Class ; + rdfs:label "recent" ; + rdfs:subClassOf :absolute_tense ; + skos:definition "close to the moment of utterance" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@reciprocal> + rdf:type owl:Class ; + rdfs:label "reciprocal" ; + rdfs:subClassOf :voice ; + skos:definition "They killed each other." ; +. +<https://unl.tetras-libre.fr/rdf/schema#@reflexive> + rdf:type owl:Class ; + rdfs:label "reflexive" ; + rdfs:subClassOf :voice ; + skos:definition "He killed himself." ; +. +<https://unl.tetras-libre.fr/rdf/schema#@regarding> + rdf:type owl:Class ; + rdfs:label "regarding" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@regardless_of> + rdf:type owl:Class ; + rdfs:label "regardless of" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@regret> + rdf:type owl:Class ; + rdfs:label "regret" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@relative> + rdf:type owl:Class ; + rdfs:label "relative" ; + rdfs:subClassOf :syntactic_structures ; + skos:definition "relative clause head" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@relief> + rdf:type owl:Class ; + rdfs:label "relief" ; + rdfs:subClassOf :emotions ; +. +<https://unl.tetras-libre.fr/rdf/schema#@remote> + rdf:type owl:Class ; + rdfs:label "remote" ; + rdfs:subClassOf :absolute_tense ; + skos:definition "remote from the moment of utterance" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@repetition> + rdf:type owl:Class ; + rdfs:label "repetition" ; + rdfs:subClassOf :Tropes ; + skos:definition "Repeated usage of word(s)/group of words in the same sentence to create a poetic/rhythmic effect" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@request> + rdf:type owl:Class ; + rdfs:label "request" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@result> + rdf:type owl:Class ; + rdfs:label "result" ; + rdfs:subClassOf :aspect ; + skos:definition "result" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@reverential> + rdf:type owl:Class ; + rdfs:label "reverential" ; + rdfs:subClassOf :social_deixis ; +. +<https://unl.tetras-libre.fr/rdf/schema#@right> + rdf:type owl:Class ; + rdfs:label "right" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@round> + rdf:type owl:Class ; + rdfs:label "round" ; + rdfs:subClassOf :nominal_attributes ; +. +<https://unl.tetras-libre.fr/rdf/schema#@same> + rdf:type owl:Class ; + rdfs:label "same" ; + rdfs:subClassOf <https://unl.tetras-libre.fr/rdf/schema#@def> ; +. +<https://unl.tetras-libre.fr/rdf/schema#@save> + rdf:type owl:Class ; + rdfs:label "save" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@side> + rdf:type owl:Class ; + rdfs:label "side" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@since> + rdf:type owl:Class ; + rdfs:label "since" ; + rdfs:subClassOf :other ; +. +<https://unl.tetras-libre.fr/rdf/schema#@single_quote> + rdf:type owl:Class ; + rdfs:label "single quote" ; + rdfs:subClassOf :conventions ; +. +<https://unl.tetras-libre.fr/rdf/schema#@singular> + rdf:type owl:Class ; + rdfs:label "singular" ; + rdfs:subClassOf :quantification ; + skos:definition "default" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@slang> + rdf:type owl:Class ; + rdfs:label "slang" ; + rdfs:subClassOf :register ; +. +<https://unl.tetras-libre.fr/rdf/schema#@so> + rdf:type owl:Class ; + rdfs:label "so" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@speculation> + rdf:type owl:Class ; + rdfs:label "speculation" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@speech> + rdf:type owl:Class ; + rdfs:label "speech" ; + rdfs:subClassOf :syntactic_structures ; + skos:definition "direct speech" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@square_bracket> + rdf:type owl:Class ; + rdfs:label "square bracket" ; + rdfs:subClassOf :conventions ; +. +<https://unl.tetras-libre.fr/rdf/schema#@subsequent_to> + rdf:type owl:Class ; + rdfs:label "subsequent to" ; + rdfs:subClassOf :other ; +. +<https://unl.tetras-libre.fr/rdf/schema#@such> + rdf:type owl:Class ; + rdfs:label "such" ; + rdfs:subClassOf <https://unl.tetras-libre.fr/rdf/schema#@def> ; +. +<https://unl.tetras-libre.fr/rdf/schema#@suggestion> + rdf:type owl:Class ; + rdfs:label "suggestion" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@superior> + rdf:type owl:Class ; + rdfs:label "superior" ; + rdfs:subClassOf :social_deixis ; +. +<https://unl.tetras-libre.fr/rdf/schema#@surprise> + rdf:type owl:Class ; + rdfs:label "surprise" ; + rdfs:subClassOf :emotions ; +. +<https://unl.tetras-libre.fr/rdf/schema#@symploce> + rdf:type owl:Class ; + rdfs:label "symploce" ; + rdfs:subClassOf :Schemes ; + skos:definition "combination of anaphora and epistrophe" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@synecdoche> + rdf:type owl:Class ; + rdfs:label "synecdoche" ; + rdfs:subClassOf :Tropes ; + skos:definition "Form of metonymy, in which a part stands for the whole" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@synesthesia> + rdf:type owl:Class ; + rdfs:label "synesthesia" ; + rdfs:subClassOf :Tropes ; + skos:definition "Description of one kind of sense impression by using words that normally describe another." ; +. +<https://unl.tetras-libre.fr/rdf/schema#@taboo> + rdf:type owl:Class ; + rdfs:label "taboo" ; + rdfs:subClassOf :register ; +. +<https://unl.tetras-libre.fr/rdf/schema#@terminative> + rdf:type owl:Class ; + rdfs:label "terminative" ; + rdfs:subClassOf :aspect ; + skos:definition "cessation" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@than> + rdf:type owl:Class ; + rdfs:label "than" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@thanks_to> + rdf:type owl:Class ; + rdfs:label "thanks to" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@that_of> + rdf:type owl:Class ; + rdfs:label "that of" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@thing> + rdf:type owl:Class ; + rdfs:label "thing" ; + rdfs:subClassOf :animacy ; +. +<https://unl.tetras-libre.fr/rdf/schema#@threat> + rdf:type owl:Class ; + rdfs:label "threat" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@through> + rdf:type owl:Class ; + rdfs:label "through" ; + rdfs:subClassOf :direction ; +. +<https://unl.tetras-libre.fr/rdf/schema#@throughout> + rdf:type owl:Class ; + rdfs:label "throughout" ; + rdfs:subClassOf :direction ; +. +<https://unl.tetras-libre.fr/rdf/schema#@times> + rdf:type owl:Class ; + rdfs:label "times" ; + rdfs:subClassOf :quantification ; + skos:definition "multiplicative" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@title> + rdf:type owl:Class ; + rdfs:label "title" ; + rdfs:subClassOf :syntactic_structures ; +. +<https://unl.tetras-libre.fr/rdf/schema#@to> + rdf:type owl:Class ; + rdfs:label "to" ; + rdfs:subClassOf :direction ; +. +<https://unl.tetras-libre.fr/rdf/schema#@top> + rdf:type owl:Class ; + rdfs:label "top" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@topic> + rdf:type owl:Class ; + rdfs:label "topic" ; + rdfs:subClassOf :information_structure ; + skos:definition "what is being talked about" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@towards> + rdf:type owl:Class ; + rdfs:label "towards" ; + rdfs:subClassOf :direction ; +. +<https://unl.tetras-libre.fr/rdf/schema#@trial> + rdf:type owl:Class ; + rdfs:label "trial" ; + rdfs:subClassOf <https://unl.tetras-libre.fr/rdf/schema#@pl> ; +. +<https://unl.tetras-libre.fr/rdf/schema#@tuple> + rdf:type owl:Class ; + rdfs:label "tuple" ; + rdfs:subClassOf :quantification ; + skos:definition "collective" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@under> + rdf:type owl:Class ; + rdfs:label "under" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@unit> + rdf:type owl:Class ; + rdfs:label "unit" ; + rdfs:subClassOf :quantification ; +. +<https://unl.tetras-libre.fr/rdf/schema#@unless> + rdf:type owl:Class ; + rdfs:label "unless" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@unlike> + rdf:type owl:Class ; + rdfs:label "unlike" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@until> + rdf:type owl:Class ; + rdfs:label "until" ; + rdfs:subClassOf :other ; +. +<https://unl.tetras-libre.fr/rdf/schema#@up> + rdf:type owl:Class ; + rdfs:label "up" ; + rdfs:subClassOf :direction ; +. +<https://unl.tetras-libre.fr/rdf/schema#@verb> + rdf:type owl:Class ; + rdfs:label "verb" ; + rdfs:subClassOf :lexical_category ; +. +<https://unl.tetras-libre.fr/rdf/schema#@versus> + rdf:type owl:Class ; + rdfs:label "versus" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@vocative> + rdf:type owl:Class ; + rdfs:label "vocative" ; + rdfs:subClassOf :syntactic_structures ; +. +<https://unl.tetras-libre.fr/rdf/schema#@warning> + rdf:type owl:Class ; + rdfs:label "warning" ; + rdfs:subClassOf :modality ; +. +<https://unl.tetras-libre.fr/rdf/schema#@weariness> + rdf:type owl:Class ; + rdfs:label "weariness" ; + rdfs:subClassOf :emotions ; +. +<https://unl.tetras-libre.fr/rdf/schema#@wh> + rdf:type owl:Class ; + rdfs:label "wh" ; + rdfs:subClassOf <https://unl.tetras-libre.fr/rdf/schema#@indef> ; +. +<https://unl.tetras-libre.fr/rdf/schema#@with> + rdf:type owl:Class ; + rdfs:label "with" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@with_regard_to> + rdf:type owl:Class ; + rdfs:label "with regard to" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@with_relation_to> + rdf:type owl:Class ; + rdfs:label "with relation to" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@with_respect_to> + rdf:type owl:Class ; + rdfs:label "with respect to" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@within> + rdf:type owl:Class ; + rdfs:label "within" ; + rdfs:subClassOf :location ; +. +<https://unl.tetras-libre.fr/rdf/schema#@without> + rdf:type owl:Class ; + rdfs:label "without" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@worth> + rdf:type owl:Class ; + rdfs:label "worth" ; + rdfs:subClassOf :manner ; +. +<https://unl.tetras-libre.fr/rdf/schema#@yes> + rdf:type owl:Class ; + rdfs:label "yes" ; + rdfs:subClassOf :polarity ; + skos:definition "affirmative" ; +. +<https://unl.tetras-libre.fr/rdf/schema#@zoomorphism> + rdf:type owl:Class ; + rdfs:label "zoomorphism" ; + rdfs:subClassOf :Tropes ; + skos:definition "Applying animal characteristics to humans or gods" ; +. +:Schemes + rdf:type owl:Class ; + rdfs:subClassOf :figure_of_speech ; +. +:Tropes + rdf:type owl:Class ; + rdfs:subClassOf :figure_of_speech ; +. +:UNLKB_Node + rdf:type owl:Class ; + rdfs:subClassOf :UNL_Node ; +. +:UNLKB_Top_Concept + rdf:type owl:Class ; + rdfs:comment "Top concepts of a UNL Knoledge Base that shall not correspond to a UW." ; + rdfs:subClassOf :UNLKB_Node ; + rdfs:subClassOf :Universal_Word ; +. +:UNL_Document + rdf:type owl:Class ; + rdfs:comment """For more information about UNL Documents, see : +http://www.unlweb.net/wiki/UNL_document""" ; + rdfs:subClassOf :UNL_Structure ; +. +:UNL_Graph_Node + rdf:type owl:Class ; + rdfs:subClassOf :UNL_Node ; +. +:UNL_Node + rdf:type owl:Class ; + rdfs:subClassOf :UNL_Structure ; +. +:UNL_Paragraph + rdf:type owl:Class ; + rdfs:comment """For more information about UNL Paragraphs, see : +http://www.unlweb.net/wiki/UNL_document""" ; + rdfs:subClassOf :UNL_Structure ; +. +:UNL_Scope + rdf:type owl:Class ; + rdfs:comment """For more information about UNL Scopes, see : +http://www.unlweb.net/wiki/Scope + +The UNL representation is a hyper-graph, which means that it may consist of several interlinked or subordinate sub-graphs. These sub-graphs are represented as hyper-nodes and correspond roughly to the concept of dependent (subordinate) clauses, i.e., groups of words that consist of a subject (explicit or implied) and a predicate and which are embedded in a larger structure (the independent clause). They are used to define the boundaries between complex semantic entities being represented.""" ; + rdfs:subClassOf :UNL_Graph_Node ; +. +:UNL_Sentence + rdf:type owl:Class ; + rdfs:comment """For mor information about UNL Sentences, see : +http://www.unlweb.net/wiki/UNL_sentence + +UNL sentences, or UNL expressions, are sentences of UNL. They are hypergraphs made out of nodes (Universal Words) interlinked by binary semantic Universal Relations and modified by Universal Attributes. UNL sentences have been the basic unit of representation inside the UNL framework.""" ; + rdfs:subClassOf :UNL_Structure ; +. +:UNL_Structure + rdf:type owl:Class ; + rdfs:comment "Sentences expressed in UNL can be organized in paragraphs and documents" ; + rdfs:label "UNL Structure" ; +. +:UW_Lexeme + rdf:type owl:Class ; + rdfs:subClassOf skos:Concept ; + rdfs:subClassOf :UNLKB_Node ; + rdfs:subClassOf :Universal_Word ; +. +:UW_Occurrence + rdf:type owl:Class ; + rdfs:subClassOf :UNL_Graph_Node ; + rdfs:subClassOf :Universal_Word ; +. +:Universal_Attribute + rdf:type owl:Class ; + rdfs:comment """More informations about Universal Attributes here : +http://www.unlweb.net/wiki/Universal_Attributes + +Classes in this hierarchy are informative. +Universal attributes must be expressed as strings (label of the attribute) with datatype :att defined in this ontology. + +Universal Attributes are arcs linking a node to itself. In opposition to Universal Relations, they correspond to one-place predicates, i.e., functions that take a single argument. In UNL, attributes have been normally used to represent information conveyed by natural language grammatical categories (such as tense, mood, aspect, number, etc). The set of attributes, which is claimed to be universal, is defined in the UNL Specs and is not open to frequent additions.""" ; + rdfs:label "Universal Attribute" ; + rdfs:subClassOf :UNL_Structure ; + owl:equivalentClass :attribute ; +. +:Universal_Relation + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:comment """For detailled specifications about UNL Universal Relations, see : +http://www.unlweb.net/wiki/Universal_Relations + +Universal Relations, formerly known as \"links\", are labelled arcs connecting a node to another node in a UNL graph. They correspond to two-place semantic predicates holding between two Universal Words. In UNL, universal relations have been normally used to represent semantic cases or thematic roles (such as agent, object, instrument, etc.) between UWs. The repertoire of universal relations is defined in the UNL Specs and it is not open to frequent additions. + +Universal Relations are organized in a hierarchy where lower nodes subsume upper nodes. The topmost level is the relation \"rel\", which simply indicates that there is a semantic relation between two elements. + +Universal Relations as Object Properties are used only in UNL Knowledge Bases. In UNL graphs, you must use the reified versions of those properties in order to specify the scopes (and not only the sources and targets).""" ; + rdfs:domain :UNL_Node ; + rdfs:label "Universal Relation" ; + rdfs:range :UNL_Node ; + rdfs:subClassOf :UNL_Structure ; + rdfs:subPropertyOf skos:semanticRelation ; + rdfs:subPropertyOf :unlObjectProperty ; + skos:altLabel "universal relation" ; + skos:definition "Simply indicates that there is a semantic relation (unspecified) between two elements. Use the sub-properties to specify a semantic relation." ; +. +:Universal_Word + rdf:type owl:Class ; + rdfs:comment """For details abour UWs, see : +http://www.unlweb.net/wiki/Universal_Words + +Universal Words, or simply UW's, are the words of UNL, and correspond to nodes - to be interlinked by Universal Relations and specified by Universal Attributes - in a UNL graph.""" ; + rdfs:label "Universal Word" ; + rdfs:subClassOf :UNL_Structure ; +. +:absolute_tense + rdf:type owl:Class ; + rdfs:subClassOf :time ; +. +:agt + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "agt" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subPropertyOf :Universal_Relation ; + skos:altLabel "agent"@en ; + skos:definition "A participant in an action or process that provokes a change of state or location."@en ; + skos:example """John killed Mary = agt(killed;John) +Mary was killed by John = agt(killed;John) +arrival of John = agt(arrival;John)"""@en ; +. +:and + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "and" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subPropertyOf :Universal_Relation ; + skos:altLabel "conjunction"@en ; + skos:definition "Used to state a conjunction between two entities."@en ; + skos:example """John and Mary = and(John;Mary) +both John and Mary = and(John;Mary) +neither John nor Mary = and(John;Mary) +John as well as Mary = and(John;Mary)"""@en ; +. +:animacy + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:ant + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "ant" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :aoj ; + rdfs:subPropertyOf :Universal_Relation ; + rdfs:subPropertyOf :aoj ; + skos:altLabel "opposition or concession"@en ; + skos:definition "Used to indicate that two entities do not share the same meaning or reference. Also used to indicate concession."@en ; + skos:example """John is not Peter = ant(Peter;John) +3 + 2 != 6 = ant(6;3+2) +Although he's quiet, he's not shy = ant(he's not shy;he's quiet)"""@en ; +. +:aoj + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "aoj" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subPropertyOf :Universal_Relation ; + skos:altLabel "object of an attribute"@en ; + skos:definition "The subject of an stative verb. Also used to express the predicative relation between the predicate and the subject."@en ; + skos:example """John has two daughters = aoj(have;John) +the book belongs to Mary = aoj(belong;book) +the book contains many pictures = aoj(contain;book) +John is sad = aoj(sad;John) +John looks sad = aoj(sad;John)"""@en ; +. +:aspect + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:attribute + rdf:type rdfs:Datatype ; + rdfs:comment """More informations about Universal Attributes here : +http://www.unlweb.net/wiki/Universal_Attributes + +You can also see the hierarchy and descriptions of available attributes as subclasses of the :Universal_Attributes class in this ontologies. Those classes are informative, as universal attributes must be expressed as strings with datatype :att here defined. + +Universal Attributes are arcs linking a node to itself. In opposition to Universal Relations, they correspond to one-place predicates, i.e., functions that take a single argument. In UNL, attributes have been normally used to represent information conveyed by natural language grammatical categories (such as tense, mood, aspect, number, etc). The set of attributes, which is claimed to be universal, is defined in the UNL Specs and is not open to frequent additions.""" ; + rdfs:label "Universal Attribute" ; + owl:equivalentClass [ + rdf:type rdfs:Datatype ; + owl:oneOf ( + "@1" + "@2" + "@3" + "@ability" + "@about" + "@above" + "@according_to" + "@across" + "@active" + "@adjective" + "@adverb" + "@advice" + "@after" + "@again" + "@against" + "@agreement" + "@all" + "@alliteration" + "@almost" + "@along" + "@also" + "@although" + "@among" + "@anacoluthon" + "@anadiplosis" + "@anaphora" + "@anastrophe" + "@and" + "@anger" + "@angle_bracket" + "@antanaclasis" + "@anterior" + "@anthropomorphism" + "@anticlimax" + "@antimetabole" + "@antiphrasis" + "@antithesis" + "@antonomasia" + "@any" + "@apposition" + "@archaic" + "@around" + "@as" + "@as.@if" + "@as_far_as" + "@as_of" + "@as_per" + "@as_regards" + "@as_well_as" + "@assertion" + "@assonance" + "@assumption" + "@asyndeton" + "@at" + "@attention" + "@back" + "@barring" + "@because" + "@because_of" + "@before" + "@behind" + "@belief" + "@below" + "@beside" + "@besides" + "@between" + "@beyond" + "@both" + "@bottom" + "@brace" + "@brachylogia" + "@but" + "@by" + "@by_means_of" + "@catachresis" + "@causative" + "@certain" + "@chiasmus" + "@circa" + "@climax" + "@clockwise" + "@colloquial" + "@command" + "@comment" + "@concerning" + "@conclusion" + "@condition" + "@confirmation" + "@consent" + "@consequence" + "@consonance" + "@contact" + "@contentment" + "@continuative" + "@conviction" + "@decision" + "@deduction" + "@def" + "@desire" + "@despite" + "@determination" + "@dialect" + "@disagreement" + "@discontentment" + "@dissent" + "@distal" + "@double_negative" + "@double_parenthesis" + "@double_quote" + "@doubt" + "@down" + "@dual" + "@due_to" + "@during" + "@dysphemism" + "@each" + "@either" + "@ellipsis" + "@emphasis" + "@enough" + "@entire" + "@entry" + "@epanalepsis" + "@epanorthosis" + "@equal" + "@equivalent" + "@euphemism" + "@even" + "@even.@if" + "@except" + "@except.@if" + "@except_for" + "@exclamation" + "@excluding" + "@exhortation" + "@expectation" + "@experiential" + "@extra" + "@failing" + "@familiar" + "@far" + "@fear" + "@female" + "@focus" + "@following" + "@for" + "@from" + "@front" + "@future" + "@generic" + "@given" + "@habitual" + "@half" + "@hesitation" + "@hope" + "@hyperbole" + "@hypothesis" + "@if" + "@if.@only" + "@imperfective" + "@in" + "@in_accordance_with" + "@in_addition_to" + "@in_case" + "@in_case_of" + "@in_front_of" + "@in_place_of" + "@in_spite_of" + "@inceptive" + "@inchoative" + "@including" + "@indef" + "@inferior" + "@inside" + "@instead_of" + "@intention" + "@interrogation" + "@intimate" + "@invitation" + "@irony" + "@iterative" + "@jargon" + "@judgement" + "@least" + "@left" + "@less" + "@like" + "@literary" + "@majority" + "@male" + "@maybe" + "@medial" + "@metaphor" + "@metonymy" + "@minority" + "@minus" + "@more" + "@most" + "@multal" + "@narrative" + "@near" + "@near_to" + "@necessity" + "@neither" + "@neutral" + "@no" + "@not" + "@notwithstanding" + "@noun" + "@obligation" + "@of" + "@off" + "@on" + "@on_account_of" + "@on_behalf_of" + "@on_top_of" + "@only" + "@onomatopoeia" + "@opinion" + "@opposite" + "@or" + "@ordinal" + "@other" + "@outside" + "@over" + "@owing_to" + "@own" + "@oxymoron" + "@pace" + "@pain" + "@paradox" + "@parallelism" + "@parenthesis" + "@paronomasia" + "@part" + "@passive" + "@past" + "@paucal" + "@pejorative" + "@per" + "@perfect" + "@perfective" + "@periphrasis" + "@permission" + "@permissive" + "@persistent" + "@person" + "@pl" + "@pleonasm" + "@plus" + "@polite" + "@polyptoton" + "@polysyndeton" + "@possibility" + "@posterior" + "@prediction" + "@present" + "@presumption" + "@prior_to" + "@probability" + "@progressive" + "@prohibition" + "@promise" + "@prospective" + "@proximal" + "@pursuant_to" + "@qua" + "@quadrual" + "@recent" + "@reciprocal" + "@reflexive" + "@regarding" + "@regardless_of" + "@regret" + "@relative" + "@relief" + "@remote" + "@repetition" + "@request" + "@result" + "@reverential" + "@right" + "@round" + "@same" + "@save" + "@side" + "@since" + "@single_quote" + "@singular" + "@slang" + "@so" + "@speculation" + "@speech" + "@square_bracket" + "@subsequent_to" + "@such" + "@suggestion" + "@superior" + "@surprise" + "@symploce" + "@synecdoche" + "@synesthesia" + "@taboo" + "@terminative" + "@than" + "@thanks_to" + "@that_of" + "@thing" + "@threat" + "@through" + "@throughout" + "@times" + "@title" + "@to" + "@top" + "@topic" + "@towards" + "@trial" + "@tuple" + "@under" + "@unit" + "@unless" + "@unlike" + "@until" + "@up" + "@upon" + "@verb" + "@versus" + "@vocative" + "@warning" + "@weariness" + "@wh" + "@with" + "@with_regard_to" + "@with_respect_to" + "@within" + "@without" + "@worth" + "@yes" + "@zoomorphism" + ) ; + ] ; +. +:bas + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "bas" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :per ; + rdfs:subPropertyOf :per ; + skos:altLabel "basis for a comparison" ; +. +:ben + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "ben" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subPropertyOf :Universal_Relation ; + skos:altLabel "beneficiary"@en ; + skos:definition "A participant who is advantaged or disadvantaged by an event."@en ; + skos:example """John works for Peter = ben(works;Peter) +John gave the book to Mary for Peter = ben(gave;Peter)"""@en ; +. +:cnt + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "cnt" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subPropertyOf :Universal_Relation ; + skos:altLabel "content or theme"@en ; + skos:definition "The object of an stative or experiental verb, or the theme of an entity."@en ; + skos:example """John has two daughters = cnt(have;two daughters) +the book belongs to Mary = cnt(belong;Mary) +the book contains many pictures = cnt(contain;many pictures) +John believes in Mary = cnt(believe;Mary) +John saw Mary = cnt(saw;Mary) +John loves Mary = cnt(love;Mary) +The explosion was heard by everyone = cnt(hear;explosion) +a book about Peter = cnt(book;Peter)"""@en ; +. +:comparative + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:con + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "con" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subPropertyOf :Universal_Relation ; + skos:altLabel "condition"@en ; + skos:definition "A condition of an event."@en ; + skos:example """If I see him, I will tell him = con(I will tell him;I see him) +I will tell him if I see him = con(I will tell him;I see him)"""@en ; +. +:conventions + rdf:type owl:Class ; + rdfs:subClassOf :syntactic_structures ; +. +:coo + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "coo" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :dur ; + rdfs:subPropertyOf :dur ; + skos:altLabel "co-occurrence" ; +. +:degree + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:direction + rdf:type owl:Class ; + rdfs:subClassOf :place ; +. +:dur + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "dur" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :tim ; + rdfs:subPropertyOf :Universal_Relation ; + rdfs:subPropertyOf :tim ; + skos:altLabel "duration or co-occurrence"@en ; + skos:definition "The duration of an entity or event."@en ; + skos:example """John worked for five hours = dur(worked;five hours) +John worked hard the whole summer = dur(worked;the whole summer) +John completed the task in ten minutes = dur(completed;ten minutes) +John was reading while Peter was cooking = dur(John was reading;Peter was cooking)"""@en ; +. +:emotions + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:equ + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "equ" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :aoj ; + rdfs:subPropertyOf :Universal_Relation ; + rdfs:subPropertyOf :aoj ; + skos:altLabel "synonym or paraphrase"@en ; + skos:definition "Used to indicate that two entities share the same meaning or reference. Also used to indicate semantic apposition."@en ; + skos:example """The morning star is the evening star = equ(evening star;morning star) +3 + 2 = 5 = equ(5;3+2) +UN (United Nations) = equ(UN;United Nations) +John, the brother of Mary = equ(John;the brother of Mary)"""@en ; +. +:exp + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "exp" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subPropertyOf :Universal_Relation ; + skos:altLabel "experiencer"@en ; + skos:definition "A participant in an action or process who receives a sensory impression or is the locus of an experiential event."@en ; + skos:example """John believes in Mary = exp(believe;John) +John saw Mary = exp(saw;John) +John loves Mary = exp(love;John) +The explosion was heard by everyone = exp(hear;everyone)"""@en ; +. +:figure_of_speech + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:fld + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "fld" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :aoj ; + rdfs:subPropertyOf :Universal_Relation ; + rdfs:subPropertyOf :aoj ; + skos:altLabel "field"@en ; + skos:definition "Used to indicate the semantic domain of an entity."@en ; + skos:example "sentence (linguistics) = fld(sentence;linguistics)"@en ; +. +:gender + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:gol + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "gol" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :plc ; + rdfs:subPropertyOf :Universal_Relation ; + rdfs:subPropertyOf :plc ; + skos:altLabel "final state, place, destination or recipient"@en ; + skos:definition "The final state, place, destination or recipient of an entity or event."@en ; + skos:example """John received the book = gol(received;John) +John won the prize = gol(won;John) +John changed from poor to rich = gol(changed;rich) +John gave the book to Mary = gol(gave;Mary) +He threw the book at me = gol(threw;me) +John goes to NY = gol(go;NY) +train to NY = gol(train;NY)"""@en ; +. +:has_attribute + rdf:type owl:DatatypeProperty ; + rdfs:domain :UNL_Node ; + rdfs:range :attribute ; + rdfs:subPropertyOf :unlDatatypeProperty ; +. +:has_id + rdf:type owl:AnnotationProperty ; + rdfs:domain :UNL_Structure ; + rdfs:subPropertyOf :unlAnnotationProperty ; +. +:has_master_definition + rdf:type owl:AnnotationProperty ; + rdfs:domain :UW_Lexeme ; + rdfs:range xsd:string ; + rdfs:subPropertyOf :unlAnnotationProperty ; +. +:has_occurrence + rdf:type owl:ObjectProperty ; + rdfs:domain :UW_Lexeme ; + rdfs:range :UW_Occurrence ; + rdfs:subPropertyOf :unlObjectProperty ; + owl:inverseOf :is_occurrence_of ; +. +:has_scope + rdf:type owl:ObjectProperty ; + rdfs:domain :Universal_Relation ; + rdfs:range :UNL_Scope ; + rdfs:subPropertyOf :unlObjectProperty ; + owl:inverseOf :is_scope_of ; +. +:has_source + rdf:type owl:ObjectProperty ; + rdfs:domain :Universal_Relation ; + rdfs:range :UNL_Node ; + rdfs:subPropertyOf :unlObjectProperty ; + owl:equivalentProperty :is_source_of ; +. +:has_target + rdf:type owl:ObjectProperty ; + rdfs:domain :Universal_Relation ; + rdfs:range :UNL_Node ; + rdfs:subPropertyOf :unlObjectProperty ; + owl:inverseOf :is_target_of ; +. +:icl + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "icl" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :aoj ; + rdfs:subPropertyOf :Universal_Relation ; + rdfs:subPropertyOf :aoj ; + skos:altLabel "hyponymy, is a kind of"@en ; + skos:definition "Used to refer to a subclass of a class."@en ; + skos:example "Dogs are mammals = icl(mammal;dogs)"@en ; +. +:information_structure + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:ins + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "ins" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :man ; + rdfs:subPropertyOf :Universal_Relation ; + rdfs:subPropertyOf :man ; + skos:altLabel "instrument or method"@en ; + skos:definition "An inanimate entity or method that an agent uses to implement an event. It is the stimulus or immediate physical cause of an event."@en ; + skos:example """The cook cut the cake with a knife = ins(cut;knife) +She used a crayon to scribble a note = ins(used;crayon) +That window was broken by a hammer = ins(broken;hammer) +He solved the problem with a new algorithm = ins(solved;a new algorithm) +He solved the problem using an algorithm = ins(solved;using an algorithm) +He used Mathematics to solve the problem = ins(used;Mathematics)"""@en ; +. +:iof + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "iof" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :aoj ; + rdfs:subPropertyOf :Universal_Relation ; + rdfs:subPropertyOf :aoj ; + skos:altLabel "is an instance of"@en ; + skos:definition "Used to refer to an instance or individual element of a class."@en ; + skos:example "John is a human being = iof(human being;John)"@en ; +. +:is_occurrence_of + rdf:type owl:ObjectProperty ; + rdfs:domain :UW_Occurrence ; + rdfs:range :UW_Lexeme ; + rdfs:subPropertyOf :unlObjectProperty ; + owl:inverseOf :has_occurrence ; +. +:is_scope_of + rdf:type owl:ObjectProperty ; + rdfs:domain :UNL_Scope ; + rdfs:range :Universal_Relation ; + rdfs:subPropertyOf :unlObjectProperty ; +. +:is_source_of + rdf:type owl:ObjectProperty ; + rdfs:domain :UNL_Node ; + rdfs:range :Universal_Relation ; + rdfs:subPropertyOf :unlObjectProperty ; +. +:is_substructure_of + rdf:type owl:ObjectProperty ; + rdfs:domain :UNL_Structure ; + rdfs:range :UNL_Structure ; + rdfs:subPropertyOf :unlObjectProperty ; + owl:inverseOf :is_superstructure_of ; +. +:is_superstructure_of + rdf:type owl:ObjectProperty ; + rdfs:domain :UNL_Structure ; + rdfs:range :UNL_Structure ; + rdfs:subPropertyOf :unlObjectProperty ; +. +:is_target_of + rdf:type owl:ObjectProperty ; + rdfs:domain :UNL_Node ; + rdfs:range :Universal_Relation ; + rdfs:subPropertyOf :unlObjectProperty ; +. +:lexical_category + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:location + rdf:type owl:Class ; + rdfs:subClassOf :place ; +. +:lpl + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "lpl" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :plc ; + rdfs:subPropertyOf :Universal_Relation ; + rdfs:subPropertyOf :plc ; + skos:altLabel "logical place"@en ; + skos:definition "A non-physical place where an entity or event occurs or a state exists."@en ; + skos:example """John works in politics = lpl(works;politics) +John is in love = lpl(John;love) +officer in command = lpl(officer;command)"""@en ; +. +:man + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "man" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subPropertyOf :Universal_Relation ; + skos:altLabel "manner"@en ; + skos:definition "Used to indicate how the action, experience or process of an event is carried out."@en ; + skos:example """John bought the car quickly = man(bought;quickly) +John bought the car in equal payments = man(bought;in equal payments) +John paid in cash = man(paid;in cash) +John wrote the letter in German = man(wrote;in German) +John wrote the letter in a bad manner = man(wrote;in a bad manner)"""@en ; +. +:manner + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:mat + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "mat" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :mod ; + rdfs:subPropertyOf :Universal_Relation ; + rdfs:subPropertyOf :mod ; + skos:altLabel "material"@en ; + skos:definition "Used to indicate the material of which an entity is made."@en ; + skos:example """A statue in bronze = mat(statue;bronze) +a wood box = mat(box;wood) +a glass mug = mat(mug;glass)"""@en ; +. +:met + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "met" ; + rdfs:subClassOf :ins ; + rdfs:subPropertyOf :Universal_Relation ; + rdfs:subPropertyOf :ins ; + skos:altLabel "method" ; +. +:mod + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "mod" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subPropertyOf :Universal_Relation ; + skos:altLabel "modifier"@en ; + skos:definition "A general modification of an entity."@en ; + skos:example """a beautiful book = mod(book;beautiful) +an old book = mod(book;old) +a book with 10 pages = mod(book;with 10 pages) +a book in hard cover = mod(book;in hard cover) +a poem in iambic pentameter = mod(poem;in iambic pentamenter) +a man in an overcoat = mod(man;in an overcoat)"""@en ; +. +:modality + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:nam + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "nam" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :mod ; + rdfs:subPropertyOf :Universal_Relation ; + rdfs:subPropertyOf :mod ; + skos:altLabel "name"@en ; + skos:definition "The name of an entity."@en ; + skos:example """The city of New York = nam(city;New York) +my friend Willy = nam(friend;Willy)"""@en ; +. +:nominal_attributes + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:obj + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "obj" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subPropertyOf :Universal_Relation ; + skos:altLabel "patient"@en ; + skos:definition "A participant in an action or process undergoing a change of state or location."@en ; + skos:example """John killed Mary = obj(killed;Mary) +Mary died = obj(died;Mary) +The snow melts = obj(melts;snow)"""@en ; +. +:opl + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "opl" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :obj ; + rdfs:subPropertyOf :Universal_Relation ; + rdfs:subPropertyOf :obj ; + skos:altLabel "objective place"@en ; + skos:definition "A place affected by an action or process."@en ; + skos:example """John was hit in the face = opl(hit;face) +John fell in the water = opl(fell;water)"""@en ; +. +:or + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "or" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subPropertyOf :Universal_Relation ; + skos:altLabel "disjunction"@en ; + skos:definition "Used to indicate a disjunction between two entities."@en ; + skos:example """John or Mary = or(John;Mary) +either John or Mary = or(John;Mary)"""@en ; +. +:other + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:per + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "per" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subPropertyOf :Universal_Relation ; + skos:altLabel "proportion, rate, distribution, measure or basis for a comparison"@en ; + skos:definition "Used to indicate a measure or quantification of an event."@en ; + skos:example """The course was split in two parts = per(split;in two parts) +twice a week = per(twice;week) +The new coat costs $70 = per(cost;$70) +John is more beautiful than Peter = per(beautiful;Peter) +John is as intelligent as Mary = per(intelligent;Mary) +John is the most intelligent of us = per(intelligent;we)"""@en ; +. +:person + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:place + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:plc + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "plc" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subPropertyOf :Universal_Relation ; + skos:altLabel "place"@en ; + skos:definition "The location or spatial orientation of an entity or event."@en ; + skos:example """John works here = plc(work;here) +John works in NY = plc(work;NY) +John works in the office = plc(work;office) +John is in the office = plc(John;office) +a night in Paris = plc(night;Paris)"""@en ; +. +:pof + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "pof" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :aoj ; + rdfs:subPropertyOf :Universal_Relation ; + rdfs:subPropertyOf :aoj ; + skos:altLabel "is part of"@en ; + skos:definition "Used to refer to a part of a whole."@en ; + skos:example "John is part of the family = pof(family;John)"@en ; +. +:polarity + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:pos + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "pos" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :mod ; + rdfs:subPropertyOf :Universal_Relation ; + rdfs:subPropertyOf :mod ; + skos:altLabel "possessor"@en ; + skos:definition "The possessor of a thing."@en ; + skos:example """the book of John = pos(book;John) +John's book = pos(book;John) +his book = pos(book;he)"""@en ; +. +:position + rdf:type owl:Class ; + rdfs:subClassOf :place ; +. +:positive + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:ptn + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "ptn" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subPropertyOf :Universal_Relation ; + skos:altLabel "partner"@en ; + skos:definition "A secondary (non-focused) participant in an event."@en ; + skos:example """John fights with Peter = ptn(fight;Peter) +John wrote the letter with Peter = ptn(wrote;Peter) +John lives with Peter = ptn(live;Peter)"""@en ; +. +:pur + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "pur" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :man ; + rdfs:subPropertyOf :Universal_Relation ; + rdfs:subPropertyOf :man ; + skos:altLabel "purpose"@en ; + skos:definition "The purpose of an entity or event."@en ; + skos:example """John left early in order to arrive early = pur(John left early;arrive early) +You should come to see us = pur(you should come;see us) +book for children = pur(book;children)"""@en ; +. +:qua + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "qua" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :mod ; + rdfs:subPropertyOf :Universal_Relation ; + rdfs:subPropertyOf :mod ; + skos:altLabel "quantity"@en ; + skos:definition "Used to express the quantity of an entity."@en ; + skos:example """two books = qua(book;2) +a group of students = qua(students;group)"""@en ; +. +:quantification + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:register + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:relative_tense + rdf:type owl:Class ; + rdfs:subClassOf :time ; +. +:res + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "res" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :obj ; + rdfs:subPropertyOf :Universal_Relation ; + rdfs:subPropertyOf :obj ; + skos:altLabel "result or factitive"@en ; + skos:definition "A referent that results from an entity or event."@en ; + skos:example """The cook bake a cake = res(bake;cake) +They built a very nice building = res(built;a very nice building)"""@en ; +. +:rsn + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "rsn" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subPropertyOf :Universal_Relation ; + skos:altLabel "reason"@en ; + skos:definition "The reason of an entity or event."@en ; + skos:example """John left because it was late = rsn(John left;it was late) +John killed Mary because of John = rsn(killed;John)"""@en ; +. +:seq + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "seq" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subPropertyOf :Universal_Relation ; + skos:altLabel "consequence"@en ; + skos:definition "Used to express consequence."@en ; + skos:example "I think therefore I am = seq(I think;I am)"@en ; +. +:social_deixis + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:specification + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:src + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "src" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :plc ; + rdfs:subPropertyOf :Universal_Relation ; + rdfs:subPropertyOf :plc ; + skos:altLabel "initial state, place, origin or source"@en ; + skos:definition "The initial state, place, origin or source of an entity or event."@en ; + skos:example """John came from NY = src(came;NY) +John is from NY = src(John;NY) +train from NY = src(train;NY) +John changed from poor into rich = src(changed;poor) +John received the book from Peter = src(received;Peter) +John withdrew the money from the cashier = src(withdrew;cashier)"""@en ; +. +:superlative + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:syntactic_structures + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:tim + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "tim" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subPropertyOf :Universal_Relation ; + skos:altLabel "time"@en ; + skos:definition "The temporal placement of an entity or event."@en ; + skos:example """The whistle will sound at noon = tim(sound;noon) +John came yesterday = tim(came;yesterday)"""@en ; +. +:time + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. +:tmf + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "tmf" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :tim ; + rdfs:subPropertyOf :Universal_Relation ; + rdfs:subPropertyOf :tim ; + skos:altLabel "initial time"@en ; + skos:definition "The initial time of an entity or event."@en ; + skos:example "John worked since early = tmf(worked;early)"@en ; +. +:tmt + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "tmt" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :tim ; + rdfs:subPropertyOf :Universal_Relation ; + rdfs:subPropertyOf :tim ; + skos:altLabel "final time"@en ; + skos:definition "The final time of an entity or event."@en ; + skos:example "John worked until late = tmt(worked;late)"@en ; +. +:unlAnnotationProperty + rdf:type owl:AnnotationProperty ; + rdfs:subPropertyOf :unlProperty ; +. +:unlDatatypeProperty + rdf:type owl:DatatypeProperty ; + rdfs:subPropertyOf :unlProperty ; +. +:unlObjectProperty + rdf:type owl:ObjectProperty ; + rdfs:subPropertyOf :unlProperty ; +. +:unlProperty + rdf:type rdf:Property ; +. +:via + rdf:type owl:Class ; + rdf:type owl:ObjectProperty ; + rdfs:label "bas" ; + rdfs:label "met" ; + rdfs:label "via" ; + rdfs:subClassOf :Universal_Relation ; + rdfs:subClassOf :plc ; + rdfs:subPropertyOf :Universal_Relation ; + rdfs:subPropertyOf :plc ; + skos:altLabel "intermediate state or place"@en ; + skos:definition "The intermediate place or state of an entity or event."@en ; + skos:example """John went from NY to Geneva through Paris = via(went;Paris) +The baby crawled across the room = via(crawled;across the room)"""@en ; +. +:voice + rdf:type owl:Class ; + rdfs:subClassOf :Universal_Attribute ; +. diff --git a/rdf/src/test/java/RdfSchemaOfUnlTest.java b/rdf/src/test/java/RdfSchemaOfUnlTest.java new file mode 100644 index 0000000000000000000000000000000000000000..da26e88b29d90a03a74396786c8423ede1e29efb --- /dev/null +++ b/rdf/src/test/java/RdfSchemaOfUnlTest.java @@ -0,0 +1,31 @@ +import org.apache.jena.rdf.model.ModelFactory; +import org.apache.jena.rdf.model.Resource; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.io.StringWriter; +import java.io.Writer; + +class RdfSchemaOfUnlTest { + + @Test + void createRdfOfUnlSentence() throws IOException { + var model = ModelFactory.createDefaultModel(); + + var test = model.createResource(); + Resource sentence = model.createResource("R2", VocabularyUnl.UNL_Sentence); + //sentence.addProperty(VocabularyUnl., "The system allows a radio channel to take on two states: Listening and Traffic"); + //sentence.addProperty(VocabularyUnl.) + Writer writer = new StringWriter(); + model.write(writer, "N-TRIPLES"); + Assertions.assertFalse(writer.toString().isBlank()); + writer.close(); + + } + + void createUnlDocument(){ + var unlDocument = VocabularyUnl.UNL_Sentence; + //unlDocument.addLabel(); + } +} \ No newline at end of file diff --git a/unl-parser/pom.xml b/unl-parser/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..70a3629a34feec171882f3b007fcaaee5ab5fe99 --- /dev/null +++ b/unl-parser/pom.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>unl2rdf</groupId> + <version>1.0-SNAPSHOT</version> + <artifactId>unl2rdf</artifactId> + </parent> + + <artifactId>unl-parser</artifactId> + <packaging>jar</packaging> + + <name>Unl-parser</name> +</project> diff --git a/unl-parser/src/main/java/unl/EqualsBuilder.java b/unl-parser/src/main/java/unl/EqualsBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..3e9016614430e15bffb4cb1118210f261ebd9092 --- /dev/null +++ b/unl-parser/src/main/java/unl/EqualsBuilder.java @@ -0,0 +1,36 @@ +package unl; + +import java.util.Vector; + +class EqualsBuilder { + private final Vector<Object> elements; + + public EqualsBuilder() { + this.elements = new Vector<>(); + } + + @Override + public boolean equals(Object obj) { + if(null == obj) return false; + + if(!(obj instanceof EqualsBuilder)) return false; + + return this.isEqual((EqualsBuilder) obj); + } + + public boolean isEqual(EqualsBuilder other) { + return elements.equals(other.elements); + } + + @Override + public int hashCode() { + return new HashCodeBuilder() + .append(elements) + .toHashCode(); + } + + public <TType> EqualsBuilder append(TType v) { + this.elements.add(v); + return this; + } +} diff --git a/unl-parser/src/main/java/unl/Graph.java b/unl-parser/src/main/java/unl/Graph.java new file mode 100644 index 0000000000000000000000000000000000000000..76e0c6a0444b19689cc0ae0546c8088d5c9178c4 --- /dev/null +++ b/unl-parser/src/main/java/unl/Graph.java @@ -0,0 +1,143 @@ +package unl; + +import java.util.Collection; +import java.util.Vector; + +public class Graph { + private final Vector<GraphNode> nodes; + private final Vector<GraphRelation> relations; + private int nodeCounter; + + public Graph(){ + this(new Vector<>(), new Vector<>()); + } + + public Graph(Collection<GraphNode> nodes, Collection<GraphRelation> relations) { + this(new Vector<>(nodes), new Vector<>(relations)); + } + + private Graph(Vector<GraphNode> nodes, Vector<GraphRelation> relations) { + this.nodes = nodes; + this.relations = relations; + this.nodeCounter = 0; + } + + public static GraphNode getEntryNode(GraphRelation relation, String graphNumber) { + String str = relation.getSubGraphReferenceLabel(); + GraphNode graphNode = null; + + if(str.equals(graphNumber)) { + if (relation.getNode1().isEntryNode()) graphNode = relation.getNode1(); + if (relation.getNode2().isEntryNode()) graphNode = relation.getNode2(); + } + + return graphNode; + } + + public static GraphNode getEntryNode(GraphRelation relation){ + return getEntryNode(relation, ""); + } + + public Vector<GraphNode> getNodes() { + return nodes; + } + + public Vector<GraphRelation> getRelations() { + return relations; + } + + public void add(GraphRelation relation){ + + // Update node 1 + int i1 = nodes.indexOf(relation.getNode1()); + if (-1 == i1){ + this.add(relation.getNode1()); + relation.getNode1().setNodeNumber(++nodeCounter); + } else { + relation.setNode1(nodes.get(i1)); + } + + // update node 2 + int i2 = nodes.indexOf(relation.getNode2()); + if (-1 == i2){ + this.add(relation.getNode2()); + relation.getNode2().setNodeNumber(++nodeCounter); + } else { + relation.setNode2(nodes.get(i2)); + } + + relations.add(relation); + } + + public void add(GraphNode node){ + this.nodes.add(node); + } + + public GraphNode getEntryNode() throws NoEntryNodeException { + return getEntryNode(""); + } + + public GraphNode getEntryNode(String graphNumber) throws NoEntryNodeException { + int i = 0; + GraphNode graphNode = null; + + while((i < relations.size()) && (null == graphNode)){ + graphNode = getEntryNode(this.relations.get(i), graphNumber); + i++; + } + + // we may not have found it, because the entry node is isolated (no relation...) + if ((null == graphNode) && (1 == this.nodes.size()) && (this.nodes.get(0).isEntryNode())){ + graphNode = this.nodes.get(0); + } + + if (null == graphNode) { + throw new NoEntryNodeException("No Entry node for subgraph " + graphNumber); + } + return graphNode; + + } + + @Override + public java.lang.String toString() { + return InternalToString(); + } + + protected String InternalToString(){ + StringBuilder sb = new StringBuilder(); + + if(this.relations.isEmpty() && !this.nodes.isEmpty()){ + sb.append("[W]") + .append(this.convertNodesToString()) + .append("[/W]"); + } else { + sb.append(this.convertRelationsToString()); + } + + return sb.toString(); + } + + private String convertRelationsToString() { + StringBuilder strBuilder = new StringBuilder(); + + for (GraphRelation graphRelation : this.relations) { + strBuilder.append(graphRelation.toString()) + .append("\n"); + } + + return strBuilder.toString(); + } + + private java.lang.String convertNodesToString() { + StringBuilder strBuilder = new StringBuilder(); + + for (GraphNode graphNode : + this.nodes) { + strBuilder.append(graphNode.toString()) + .append("\n"); + } + + return strBuilder.toString(); + } + +} diff --git a/unl-parser/src/main/java/unl/GraphExporter.java b/unl-parser/src/main/java/unl/GraphExporter.java new file mode 100644 index 0000000000000000000000000000000000000000..1a2bc3ed0c2e153e9dfffbbbe1e73b47baa53d2d --- /dev/null +++ b/unl-parser/src/main/java/unl/GraphExporter.java @@ -0,0 +1,7 @@ +package unl; + +import java.io.IOException; + +public interface GraphExporter { + void Write(Graph g) throws IOException; +} diff --git a/unl-parser/src/main/java/unl/GraphNode.java b/unl-parser/src/main/java/unl/GraphNode.java new file mode 100644 index 0000000000000000000000000000000000000000..11e1262729a127d0ac437d52ab8670366941e8f2 --- /dev/null +++ b/unl-parser/src/main/java/unl/GraphNode.java @@ -0,0 +1,77 @@ +package unl; + +import java.util.Set; +import java.util.TreeSet; + +public abstract class GraphNode { + private static final String entryAttribute = ".@entry"; + private final Set attributes; + private int nodeNumber; + + public GraphNode(Set attributes) { + this.attributes = null == attributes ? new TreeSet() : attributes; + } + + public int setNodeNumber(int nodeNumber) { + return this.nodeNumber = nodeNumber; + } + + public int getNodeNumber() { + return nodeNumber; + } + + public Set getAttributes() { + return attributes; + } + + public boolean isEntryNode() { + return this.attributes.contains(entryAttribute); + } + + public abstract String getNodeId(); + + @Override + public boolean equals(Object other){ + if(null == other) return false; + if(other == this) return true; + if(!(other instanceof GraphNode)) return false; + + return this.CreateEqualityBuilder().isEqual(((GraphNode)other).CreateEqualityBuilder()); + } + + @Override + public int hashCode() { + return this.CreateHashCodeBuilder() + .toHashCode(); + } + + private HashCodeBuilder CreateHashCodeBuilder(){ + return this.InternalCreateHashCodeBuilder(); + } + + private EqualsBuilder CreateEqualityBuilder() + { + return this.InternalCreateEqualityBuilder(); + } + + protected EqualsBuilder InternalCreateEqualityBuilder() { + return new EqualsBuilder() + .append(attributes); + } + + protected HashCodeBuilder InternalCreateHashCodeBuilder() { + return new HashCodeBuilder() + .append(attributes); + } + + @Override + public String toString() { + return String.join("", this.attributes); + } + + /* + protected String InternalToString(){ + return String.join("", this.attributes); + } + */ +} diff --git a/unl-parser/src/main/java/unl/GraphRelation.java b/unl-parser/src/main/java/unl/GraphRelation.java new file mode 100644 index 0000000000000000000000000000000000000000..2d90309e6f341d264cfa2c50151b0a9a86bd7d6c --- /dev/null +++ b/unl-parser/src/main/java/unl/GraphRelation.java @@ -0,0 +1,52 @@ +package unl; + +public class GraphRelation { + private GraphNode node2; + private final String relationLabel; + private final String SubGraphReferenceLabel; + private GraphNode node1; + + public GraphRelation(GraphNode node1, GraphNode node2, String relationLabel) { + this(node1, node2, relationLabel, ""); + } + + public GraphRelation(GraphNode node1, GraphNode node2, String relationLabel, String subGraphReferenceLabel) { + this.node1 = node1; + this.node2 = node2; + this.relationLabel = relationLabel; + SubGraphReferenceLabel = subGraphReferenceLabel; + } + + public GraphNode getNode1() { + return node1; + } + + public void setNode1(GraphNode graphNode) { + this.node1 = graphNode; + } + + public GraphNode getNode2() { + return node2; + } + + public void setNode2(GraphNode graphNode) { + this.node2 = graphNode; + } + + public String getRelationLabel() { + return relationLabel; + } + + public String getSubGraphReferenceLabel() { + return SubGraphReferenceLabel; + } + + @Override + public String toString() { + return String.format("%s%s(%s,%s)", + this.relationLabel, + this.getSubGraphReferenceLabel(), + this.node1.toString(), + this.node2.toString()); + } +} diff --git a/unl-parser/src/main/java/unl/HashCodeBuilder.java b/unl-parser/src/main/java/unl/HashCodeBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..3e5798d0479eeaecfea14f7b51baa8d67b1bad8a --- /dev/null +++ b/unl-parser/src/main/java/unl/HashCodeBuilder.java @@ -0,0 +1,24 @@ +package unl; + +import java.util.Vector; + +public class HashCodeBuilder { + private Vector<Object> elements; + + HashCodeBuilder(){ + elements = new Vector<>(); + } + + public HashCodeBuilder append(Object o){ + elements.add(o); + return this; + } + + public int toHashCode(){ + int hash = 391; + for (Object element: this.elements) { + hash = 391 * hash + (element == null ? 0 : element.hashCode()); + } + return hash; + } +} diff --git a/unl-parser/src/main/java/unl/NoEntryNodeException.java b/unl-parser/src/main/java/unl/NoEntryNodeException.java new file mode 100644 index 0000000000000000000000000000000000000000..5f8996cbae72ee34abac8530d822cd58ffe4acdf --- /dev/null +++ b/unl-parser/src/main/java/unl/NoEntryNodeException.java @@ -0,0 +1,7 @@ +package unl; + +public class NoEntryNodeException extends Exception { + public NoEntryNodeException(String message) { + super(message); + } +} diff --git a/unl-parser/src/main/java/unl/Restriction.java b/unl-parser/src/main/java/unl/Restriction.java new file mode 100644 index 0000000000000000000000000000000000000000..31188686cfdb0dec55d0c6cfbe2f280c1f0494ae --- /dev/null +++ b/unl-parser/src/main/java/unl/Restriction.java @@ -0,0 +1,55 @@ +package unl; + +public class Restriction implements Comparable<Restriction> { + private String label; + + // TODO : to be refactored, once enum has been generated + private char direction; + + private UniversalWord universalWord; + + public Restriction(){ + this("", ' ', null); + } + + public Restriction(String label, char direction, UniversalWord universalWord) { + this.label = label; + this.direction = direction; + this.universalWord = universalWord; + } + + public int compareTo(Restriction o) { + return this.toString().compareTo(o.toString()); + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + + public char getDirection() { + return direction; + } + + public void setDirection(char direction) { + this.direction = direction; + } + + public UniversalWord getUniversalWord() { + return universalWord; + } + + public void setUniversalWord(UniversalWord universalWord) { + this.universalWord = universalWord; + } + + @Override + public String toString() { + if (null == universalWord) return ""; + + return String.format("%s%s%s", this.label, this.direction, universalWord.toString()); + } +} diff --git a/unl-parser/src/main/java/unl/SubGraphReferenceNode.java b/unl-parser/src/main/java/unl/SubGraphReferenceNode.java new file mode 100644 index 0000000000000000000000000000000000000000..d81d89f16be5a4b899e64e6f2c23f105d22a7723 --- /dev/null +++ b/unl-parser/src/main/java/unl/SubGraphReferenceNode.java @@ -0,0 +1,44 @@ +package unl; + +import java.util.Set; +import java.util.TreeSet; + +public class SubGraphReferenceNode extends GraphNode { + private final String referenceNumber; + + public SubGraphReferenceNode(String referenceNumber) { + this(referenceNumber, new TreeSet()); + } + + public SubGraphReferenceNode(String referenceNumber, Set attributes) { + super(attributes); + this.referenceNumber = referenceNumber; + } + + public String getNodeId() { + return null; + } + + public String getReferenceNumber() { + return referenceNumber; + } + + @Override + protected EqualsBuilder InternalCreateEqualityBuilder() { + return super.InternalCreateEqualityBuilder() + .append(referenceNumber); + } + + @Override + protected HashCodeBuilder InternalCreateHashCodeBuilder() { + return super.InternalCreateHashCodeBuilder() + .append(referenceNumber); + } + + + + @Override + public String toString() { + return String.format("%s%s", this.referenceNumber, super.toString()); + } +} diff --git a/unl-parser/src/main/java/unl/UniversalWord.java b/unl-parser/src/main/java/unl/UniversalWord.java new file mode 100644 index 0000000000000000000000000000000000000000..b391b95591d61614cdc3c9350e8507e7108547c8 --- /dev/null +++ b/unl-parser/src/main/java/unl/UniversalWord.java @@ -0,0 +1,103 @@ +package unl; + +import java.util.Set; +import java.util.SortedSet; +import java.util.TreeSet; + +public class UniversalWord { + private final String headword; + private final SortedSet<Restriction> restrictions; + + public UniversalWord() { + this("", new TreeSet<>()); + } + + public UniversalWord(String headword, Set<Restriction> restrictions) { + this(headword, new TreeSet<>(restrictions)); + } + + public UniversalWord(String headword, SortedSet<Restriction> restrictions) { + this.headword = headword; + this.restrictions = restrictions; + } + + public String getHeadword() { + return headword; + } + + public SortedSet<Restriction> getRestrictions() { + return restrictions; + } + + public boolean addRestriction(Restriction restriction){ + return restrictions.add(restriction); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + if (this.restrictions != null) { + for (Restriction restriction : this.restrictions) { + sb.append(restriction.toString()).append(","); + } + } + + // remove exceeding comma if necessary + String suffix = sb.length() > 0 ? "(" + sb.substring(0, sb.length() - 1) + ")" : sb.toString(); + + return String.format("%s%s", headword, suffix); + } + + /** + * Get the headword of string that represent universalWord + * @param universalWord the universalWord string to parse + * @return the headword of universalWord string + * @throws IllegalArgumentException the parameter is null or is whitespaces + */ + public static String getHeadword(String universalWord) { + if (null == universalWord || universalWord.trim().equals("")) + throw new IllegalArgumentException("universalWord should not be whitespaces or null"); + + int parenthesisPosition = universalWord.indexOf("("); + if (parenthesisPosition > 0) { + return universalWord.substring(0, parenthesisPosition); + } + + return universalWord; + } + + @Override + public boolean equals(Object obj) { + if(null == obj) { + return false; + } + + if(!(obj instanceof UniversalWord)) return false; + + return equals((UniversalWord) obj); + } + + private boolean equals(UniversalWord other) { + boolean result = this.headword.equals(other.headword); + + result = result && ( + ((this.restrictions == null || this.restrictions.isEmpty()) && (other.restrictions == null || other.restrictions.isEmpty())) + || (this.restrictions != null && this.restrictions.equals(other.restrictions)) + || (other.restrictions != null && other.restrictions.equals(this.restrictions)) + ); + + return result; + } + + /** + * Test if th current universal word represent a number. + * @return true if the current universal word is a number otherwise false. + */ + public boolean isNumber(){ + try { + return Integer.parseInt(headword, 10) != Integer.MIN_VALUE; + } catch (NumberFormatException e){ + return false; + } + } +} diff --git a/unl-parser/src/main/java/unl/UniversalWordNode.java b/unl-parser/src/main/java/unl/UniversalWordNode.java new file mode 100644 index 0000000000000000000000000000000000000000..f0eb0f5e909d6bf04e89b9d10074f866fa2b6414 --- /dev/null +++ b/unl-parser/src/main/java/unl/UniversalWordNode.java @@ -0,0 +1,58 @@ +package unl; + +import java.util.Set; + +public class UniversalWordNode extends GraphNode { + private final UniversalWord universalWord; + private final String instanceNumber; + + public UniversalWordNode(UniversalWord universalWord, Set attributes, String instanceNumber) { + super(attributes); + this.universalWord = universalWord; + this.instanceNumber = instanceNumber; + } + + public UniversalWordNode(UniversalWord universalWord, Set attributes) { + this(universalWord, attributes, ""); + } + + public String getNodeId() { + return this.universalWord.toString() + this.instanceNumber; + } + + public UniversalWord getUniversalWord() { + return universalWord; + } + + public String getInstanceNumber() { + return instanceNumber; + } + + @Override + protected EqualsBuilder InternalCreateEqualityBuilder() { + return super.InternalCreateEqualityBuilder() + .append(this.universalWord) + .append(this.instanceNumber); + } + + @Override + protected HashCodeBuilder InternalCreateHashCodeBuilder() { + return super.InternalCreateHashCodeBuilder() + .append(this.universalWord) + .append(this.instanceNumber); + } + + @Override + public String toString() { + StringBuilder stringBuilder = new StringBuilder(universalWord.toString()); + + if (!this.instanceNumber.trim().equals("")) { + stringBuilder.append(":") + .append(this.instanceNumber); + } + + stringBuilder.append(super.toString()); + + return stringBuilder.toString(); + } +} diff --git a/unl-parser/src/main/java/unl/UnlDocument.java b/unl-parser/src/main/java/unl/UnlDocument.java new file mode 100644 index 0000000000000000000000000000000000000000..97b5bb8a544402dbc60b3bf78d5aff9669ecc259 --- /dev/null +++ b/unl-parser/src/main/java/unl/UnlDocument.java @@ -0,0 +1,73 @@ +package unl; + +import java.util.Collection; +import java.util.Vector; + +public class UnlDocument { + private final String docLabel; + private final Vector<UnlDocumentNode> docElements; + private String error; + + public UnlDocument(){ + this("[D]", new Vector<>()); + } + + public UnlDocument(String docLabel){ + this(docLabel, new Vector<>()); + } + + public UnlDocument(String docLabel, Collection<UnlDocumentNode> docElements) { + this(docLabel, new Vector<>(docElements)); + } + + public UnlDocument(String docLabel, Vector<UnlDocumentNode> docElements){ + this.docLabel = docLabel; + this.docElements = docElements; + } + + public String getDocLabel() { + return docLabel; + } + + public Vector<UnlDocumentNode> getDocElements() { + return docElements; + } + + public String getError() { + return error; + } + + public boolean HasError(){ + return null != error; // && !error.trim().isEmpty(); + } + + public void setError(String error) { + this.error = error; + } + + public void add(UnlDocumentNode unlDocumentNode){ + this.docElements.add(unlDocumentNode); + } + + private boolean hasError() { + return this.error != null && this.error.trim().equals(""); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + + sb.append(docLabel); + if (hasError()){ + sb.append(String.format("[ERROR]%s[/ERROR]\n", this.error)); + } + for (UnlDocumentNode unlDocElement: this.docElements) { + sb.append(unlDocElement.toString()) + .append("\n"); + } + sb.append("[/D]") + .append("\n"); + + return sb.toString(); + } +} diff --git a/unl-parser/src/main/java/unl/UnlDocumentNode.java b/unl-parser/src/main/java/unl/UnlDocumentNode.java new file mode 100644 index 0000000000000000000000000000000000000000..ba81e0450f96c8ab6b6287f9ec19751080cef5db --- /dev/null +++ b/unl-parser/src/main/java/unl/UnlDocumentNode.java @@ -0,0 +1,75 @@ +package unl; + +public class UnlDocumentNode { + + private UnlDocumentNodeType kindOfNode; + private String docNodeLabel; + private Graph graph; + private String error; + + public UnlDocumentNode(UnlDocumentNodeType kindOfNode) { + this(kindOfNode, "", null); + } + + public UnlDocumentNode(UnlDocumentNodeType kindOfNode, String docNodeLabel) { + this(kindOfNode, docNodeLabel, null); + } + + public UnlDocumentNode(UnlDocumentNodeType kindOfNode, String docNodeLabel, Graph graph) { + this.kindOfNode = kindOfNode; + this.docNodeLabel = docNodeLabel; + this.graph = graph; + } + + public UnlDocumentNode(String error){ + this.error = error; + } + + public UnlDocumentNodeType getKindOfNode() { + return kindOfNode; + } + + public String getDocNodeLabel() { + return docNodeLabel; + } + + public Graph getGraph() { + return graph; + } + + public String getError() { + return error; + } + + public void setGraph(Graph graph) { + this.graph = graph; + } + + public void setError(String error) { + this.error = error; + } + + public boolean hasError(){ + return null != this.error && !this.error.trim().equals(""); + } + + @Override + public String toString() { + switch (this.kindOfNode){ + case ParagraphStart: + return String.format("%s\n", this.docNodeLabel); + case ParagraphEnd: + return "[/P]\n"; + case Title: + return "[/T]\n"; + case Sentence: + return String.format("%s\n%s\n[/S]", this.docNodeLabel, this.graph.toString()); + } + + if (this.hasError()){ + return String.format("[S][ERROR]%s[/ERROR][/S]", this.error); + } + + throw new IllegalStateException(String.format("Unknown type of sentence node '%s'", this.kindOfNode.toString())); + } +} diff --git a/unl-parser/src/main/java/unl/UnlDocumentNodeType.java b/unl-parser/src/main/java/unl/UnlDocumentNodeType.java new file mode 100644 index 0000000000000000000000000000000000000000..2fcf37172e039b977794684a9f550cccc3c2c390 --- /dev/null +++ b/unl-parser/src/main/java/unl/UnlDocumentNodeType.java @@ -0,0 +1,8 @@ +package unl; + +public enum UnlDocumentNodeType { + ParagraphStart, + ParagraphEnd, + Title, + Sentence +} diff --git a/unl-parser/src/main/java/unl/parser/ParseException.java b/unl-parser/src/main/java/unl/parser/ParseException.java new file mode 100644 index 0000000000000000000000000000000000000000..95c01a16735e7875850a453c8ed31f4038932a26 --- /dev/null +++ b/unl-parser/src/main/java/unl/parser/ParseException.java @@ -0,0 +1,193 @@ +/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 7.0 */ +/* JavaCCOptions:KEEP_LINE_COLUMN=true */ +package unl.parser; + +/** + * This exception is thrown when parse errors are encountered. + * You can explicitly create objects of this exception type by + * calling the method generateParseException in the generated + * parser. + * + * You can modify this class to customize your error reporting + * mechanisms so long as you retain the public fields. + */ +public class ParseException extends Exception { + + /** + * The version identifier for this Serializable class. + * Increment only if the <i>serialized</i> form of the + * class changes. + */ + private static final long serialVersionUID = 1L; + + /** + * The end of line string for this machine. + */ + protected static String EOL = System.getProperty("line.separator", "\n"); + + /** + * This constructor is used by the method "generateParseException" + * in the generated parser. Calling this constructor generates + * a new object of this type with the fields "currentToken", + * "expectedTokenSequences", and "tokenImage" set. + */ + public ParseException(Token currentTokenVal, + int[][] expectedTokenSequencesVal, + String[] tokenImageVal + ) + { + super(initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal)); + currentToken = currentTokenVal; + expectedTokenSequences = expectedTokenSequencesVal; + tokenImage = tokenImageVal; + } + + /** + * The following constructors are for use by you for whatever + * purpose you can think of. Constructing the exception in this + * manner makes the exception behave in the normal way - i.e., as + * documented in the class "Throwable". The fields "errorToken", + * "expectedTokenSequences", and "tokenImage" do not contain + * relevant information. The JavaCC generated code does not use + * these constructors. + */ + + public ParseException() { + super(); + } + + /** Constructor with message. */ + public ParseException(String message) { + super(message); + } + + + /** + * This is the last token that has been consumed successfully. If + * this object has been created due to a parse error, the token + * followng this token will (therefore) be the first error token. + */ + public Token currentToken; + + /** + * Each entry in this array is an array of integers. Each array + * of integers represents a sequence of tokens (by their ordinal + * values) that is expected at this point of the parse. + */ + public int[][] expectedTokenSequences; + + /** + * This is a reference to the "tokenImage" array of the generated + * parser within which the parse error occurred. This array is + * defined in the generated ...Constants interface. + */ + public String[] tokenImage; + + /** + * It uses "currentToken" and "expectedTokenSequences" to generate a parse + * error message and returns it. If this object has been created + * due to a parse error, and you do not catch it (it gets thrown + * from the parser) the correct error message + * gets displayed. + */ + private static String initialise(Token currentToken, + int[][] expectedTokenSequences, + String[] tokenImage) { + + StringBuffer expected = new StringBuffer(); + int maxSize = 0; + for (int i = 0; i < expectedTokenSequences.length; i++) { + if (maxSize < expectedTokenSequences[i].length) { + maxSize = expectedTokenSequences[i].length; + } + for (int j = 0; j < expectedTokenSequences[i].length; j++) { + expected.append(tokenImage[expectedTokenSequences[i][j]]).append(' '); + } + if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { + expected.append("..."); + } + expected.append(EOL).append(" "); + } + String retval = "Encountered \""; + Token tok = currentToken.next; + for (int i = 0; i < maxSize; i++) { + if (i != 0) retval += " "; + if (tok.kind == 0) { + retval += tokenImage[0]; + break; + } + retval += " " + tokenImage[tok.kind]; + retval += " \""; + retval += add_escapes(tok.image); + retval += " \""; + tok = tok.next; + } + retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; + retval += "." + EOL; + + + if (expectedTokenSequences.length == 0) { + // Nothing to add here + } else { + if (expectedTokenSequences.length == 1) { + retval += "Was expecting:" + EOL + " "; + } else { + retval += "Was expecting one of:" + EOL + " "; + } + retval += expected.toString(); + } + + return retval; + } + + + /** + * Used to convert raw characters to their escaped version + * when these raw version cannot be used as part of an ASCII + * string literal. + */ + static String add_escapes(String str) { + StringBuffer retval = new StringBuffer(); + char ch; + for (int i = 0; i < str.length(); i++) { + switch (str.charAt(i)) + { + case '\b': + retval.append("\\b"); + continue; + case '\t': + retval.append("\\t"); + continue; + case '\n': + retval.append("\\n"); + continue; + case '\f': + retval.append("\\f"); + continue; + case '\r': + retval.append("\\r"); + continue; + case '\"': + retval.append("\\\""); + continue; + case '\'': + retval.append("\\'"); + continue; + case '\\': + retval.append("\\\\"); + continue; + default: + if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { + String s = "0000" + Integer.toString(ch, 16); + retval.append("\\u" + s.substring(s.length() - 4)); + } else { + retval.append(ch); + } + continue; + } + } + return retval.toString(); + } + +} +/* JavaCC - OriginalChecksum=4090ac87a61c12ad7dfb83c7db2fe5c6 (do not edit this line) */ diff --git a/unl-parser/src/main/java/unl/parser/SimpleCharStream.java b/unl-parser/src/main/java/unl/parser/SimpleCharStream.java new file mode 100644 index 0000000000000000000000000000000000000000..e5b4d34bf57335321a1c491940b47d13c40d4e4e --- /dev/null +++ b/unl-parser/src/main/java/unl/parser/SimpleCharStream.java @@ -0,0 +1,474 @@ +/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 7.0 */ +/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ +package unl.parser; + +/** + * An implementation of interface CharStream, where the stream is assumed to + * contain only ASCII characters (without unicode processing). + */ + +public class SimpleCharStream +{ +/** Whether parser is static. */ + public static final boolean staticFlag = false; + int bufsize; + int available; + int tokenBegin; +/** Position in buffer. */ + public int bufpos = -1; + protected int[] bufline; + protected int[] bufcolumn; + + protected int column = 0; + protected int line = 1; + + protected boolean prevCharIsCR = false; + protected boolean prevCharIsLF = false; + + protected java.io.Reader inputStream; + + protected char[] buffer; + protected int maxNextCharInd = 0; + protected int inBuf = 0; + protected int tabSize = 1; + protected boolean trackLineColumn = true; + + public void setTabSize(int i) { tabSize = i; } + public int getTabSize() { return tabSize; } + + + + protected void ExpandBuff(boolean wrapAround) + { + char[] newbuffer = new char[bufsize + 2048]; + int[] newbufline = new int[bufsize + 2048]; + int[] newbufcolumn = new int[bufsize + 2048]; + + try + { + if (wrapAround) + { + System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); + System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos); + buffer = newbuffer; + + System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); + System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); + bufline = newbufline; + + System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); + System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); + bufcolumn = newbufcolumn; + + maxNextCharInd = (bufpos += (bufsize - tokenBegin)); + } + else + { + System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); + buffer = newbuffer; + + System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); + bufline = newbufline; + + System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); + bufcolumn = newbufcolumn; + + maxNextCharInd = (bufpos -= tokenBegin); + } + } + catch (Throwable t) + { + throw new Error(t.getMessage()); + } + + + bufsize += 2048; + available = bufsize; + tokenBegin = 0; + } + + protected void FillBuff() throws java.io.IOException + { + if (maxNextCharInd == available) + { + if (available == bufsize) + { + if (tokenBegin > 2048) + { + bufpos = maxNextCharInd = 0; + available = tokenBegin; + } + else if (tokenBegin < 0) + bufpos = maxNextCharInd = 0; + else + ExpandBuff(false); + } + else if (available > tokenBegin) + available = bufsize; + else if ((tokenBegin - available) < 2048) + ExpandBuff(true); + else + available = tokenBegin; + } + + int i; + try { + if ((i = inputStream.read(buffer, maxNextCharInd, available - maxNextCharInd)) == -1) + { + inputStream.close(); + throw new java.io.IOException(); + } + else + maxNextCharInd += i; + return; + } + catch(java.io.IOException e) { + --bufpos; + backup(0); + if (tokenBegin == -1) + tokenBegin = bufpos; + throw e; + } + } + +/** Start. */ + public char BeginToken() throws java.io.IOException + { + tokenBegin = -1; + char c = readChar(); + tokenBegin = bufpos; + + return c; + } + + protected void UpdateLineColumn(char c) + { + column++; + + if (prevCharIsLF) + { + prevCharIsLF = false; + line += (column = 1); + } + else if (prevCharIsCR) + { + prevCharIsCR = false; + if (c == '\n') + { + prevCharIsLF = true; + } + else + line += (column = 1); + } + + switch (c) + { + case '\r' : + prevCharIsCR = true; + break; + case '\n' : + prevCharIsLF = true; + break; + case '\t' : + column--; + column += (tabSize - (column % tabSize)); + break; + default : + break; + } + + bufline[bufpos] = line; + bufcolumn[bufpos] = column; + } + +/** Read a character. */ + public char readChar() throws java.io.IOException + { + if (inBuf > 0) + { + --inBuf; + + if (++bufpos == bufsize) + bufpos = 0; + + return buffer[bufpos]; + } + + if (++bufpos >= maxNextCharInd) + FillBuff(); + + char c = buffer[bufpos]; + + UpdateLineColumn(c); + return c; + } + + @Deprecated + /** + * @deprecated + * @see #getEndColumn + */ + + public int getColumn() { + return bufcolumn[bufpos]; + } + + @Deprecated + /** + * @deprecated + * @see #getEndLine + */ + + public int getLine() { + return bufline[bufpos]; + } + + /** Get token end column number. */ + public int getEndColumn() { + return bufcolumn[bufpos]; + } + + /** Get token end line number. */ + public int getEndLine() { + return bufline[bufpos]; + } + + /** Get token beginning column number. */ + public int getBeginColumn() { + return bufcolumn[tokenBegin]; + } + + /** Get token beginning line number. */ + public int getBeginLine() { + return bufline[tokenBegin]; + } + +/** Backup a number of characters. */ + public void backup(int amount) { + + inBuf += amount; + if ((bufpos -= amount) < 0) + bufpos += bufsize; + } + + /** Constructor. */ + public SimpleCharStream(java.io.Reader dstream, int startline, + int startcolumn, int buffersize) + { + inputStream = dstream; + line = startline; + column = startcolumn - 1; + + available = bufsize = buffersize; + buffer = new char[buffersize]; + bufline = new int[buffersize]; + bufcolumn = new int[buffersize]; + } + + /** Constructor. */ + public SimpleCharStream(java.io.Reader dstream, int startline, + int startcolumn) + { + this(dstream, startline, startcolumn, 4096); + } + + /** Constructor. */ + public SimpleCharStream(java.io.Reader dstream) + { + this(dstream, 1, 1, 4096); + } + + /** Reinitialise. */ + public void ReInit(java.io.Reader dstream, int startline, + int startcolumn, int buffersize) + { + inputStream = dstream; + line = startline; + column = startcolumn - 1; + + if (buffer == null || buffersize != buffer.length) + { + available = bufsize = buffersize; + buffer = new char[buffersize]; + bufline = new int[buffersize]; + bufcolumn = new int[buffersize]; + } + prevCharIsLF = prevCharIsCR = false; + tokenBegin = inBuf = maxNextCharInd = 0; + bufpos = -1; + } + + /** Reinitialise. */ + public void ReInit(java.io.Reader dstream, int startline, + int startcolumn) + { + ReInit(dstream, startline, startcolumn, 4096); + } + + /** Reinitialise. */ + public void ReInit(java.io.Reader dstream) + { + ReInit(dstream, 1, 1, 4096); + } + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline, + int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException + { + this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); + } + + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream, int startline, + int startcolumn, int buffersize) + { + this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); + } + + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline, + int startcolumn) throws java.io.UnsupportedEncodingException + { + this(dstream, encoding, startline, startcolumn, 4096); + } + + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream, int startline, + int startcolumn) + { + this(dstream, startline, startcolumn, 4096); + } + + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException + { + this(dstream, encoding, 1, 1, 4096); + } + + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream) + { + this(dstream, 1, 1, 4096); + } + + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, String encoding, int startline, + int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException + { + ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); + } + + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, int startline, + int startcolumn, int buffersize) + { + ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); + } + + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException + { + ReInit(dstream, encoding, 1, 1, 4096); + } + + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream) + { + ReInit(dstream, 1, 1, 4096); + } + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, String encoding, int startline, + int startcolumn) throws java.io.UnsupportedEncodingException + { + ReInit(dstream, encoding, startline, startcolumn, 4096); + } + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, int startline, + int startcolumn) + { + ReInit(dstream, startline, startcolumn, 4096); + } + /** Get token literal value. */ + public String GetImage() + { + if (bufpos >= tokenBegin) + return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); + else + return new String(buffer, tokenBegin, bufsize - tokenBegin) + + new String(buffer, 0, bufpos + 1); + } + + /** Get the suffix. */ + public char[] GetSuffix(int len) + { + char[] ret = new char[len]; + + if ((bufpos + 1) >= len) + System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); + else + { + System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, + len - bufpos - 1); + System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); + } + + return ret; + } + + /** Reset buffer when finished. */ + public void Done() + { + buffer = null; + bufline = null; + bufcolumn = null; + } + + /** + * Method to adjust line and column numbers for the start of a token. + */ + public void adjustBeginLineColumn(int newLine, int newCol) + { + int start = tokenBegin; + int len; + + if (bufpos >= tokenBegin) + { + len = bufpos - tokenBegin + inBuf + 1; + } + else + { + len = bufsize - tokenBegin + bufpos + 1 + inBuf; + } + + int i = 0, j = 0, k = 0; + int nextColDiff = 0, columnDiff = 0; + + while (i < len && bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) + { + bufline[j] = newLine; + nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; + bufcolumn[j] = newCol + columnDiff; + columnDiff = nextColDiff; + i++; + } + + if (i < len) + { + bufline[j] = newLine++; + bufcolumn[j] = newCol + columnDiff; + + while (i++ < len) + { + if (bufline[j = start % bufsize] != bufline[++start % bufsize]) + bufline[j] = newLine++; + else + bufline[j] = newLine; + } + } + + line = bufline[j]; + column = bufcolumn[j]; + } + boolean getTrackLineColumn() { return trackLineColumn; } + void setTrackLineColumn(boolean tlc) { trackLineColumn = tlc; } +} +/* JavaCC - OriginalChecksum=3460827038708d67fb13785809455f72 (do not edit this line) */ diff --git a/unl-parser/src/main/java/unl/parser/Token.java b/unl-parser/src/main/java/unl/parser/Token.java new file mode 100644 index 0000000000000000000000000000000000000000..2df57a626b3adcd05113ea28eb7676c93647824f --- /dev/null +++ b/unl-parser/src/main/java/unl/parser/Token.java @@ -0,0 +1,132 @@ +/* Generated By:JavaCC: Do not edit this line. Token.java Version 7.0 */ +/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COLUMN=true,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ +package unl.parser; + +/** + * Describes the input token stream. + */ + +public class Token implements java.io.Serializable { + + /** + * The version identifier for this Serializable class. + * Increment only if the <i>serialized</i> form of the + * class changes. + */ + private static final long serialVersionUID = 1L; + + /** + * An integer that describes the kind of this token. This numbering + * system is determined by JavaCCParser, and a table of these numbers is + * stored in the file ...Constants.java. + */ + public int kind; + + /** The line number of the first character of this Token. */ + public int beginLine; + /** The column number of the first character of this Token. */ + public int beginColumn; + /** The line number of the last character of this Token. */ + public int endLine; + /** The column number of the last character of this Token. */ + public int endColumn; + + /** + * The string image of the token. + */ + public String image; + + /** + * A reference to the next regular (non-special) token from the input + * stream. If this is the last token from the input stream, or if the + * token manager has not read tokens beyond this one, this field is + * set to null. This is true only if this token is also a regular + * token. Otherwise, see below for a description of the contents of + * this field. + */ + public Token next; + + /** + * This field is used to access special tokens that occur prior to this + * token, but after the immediately preceding regular (non-special) token. + * If there are no such special tokens, this field is set to null. + * When there are more than one such special token, this field refers + * to the last of these special tokens, which in turn refers to the next + * previous special token through its specialToken field, and so on + * until the first special token (whose specialToken field is null). + * The next fields of special tokens refer to other special tokens that + * immediately follow it (without an intervening regular token). If there + * is no such token, this field is null. + */ + public Token specialToken; + + /** + * An optional attribute value of the Token. + * Tokens which are not used as syntactic sugar will often contain + * meaningful values that will be used later on by the compiler or + * interpreter. This attribute value is often different from the image. + * Any subclass of Token that actually wants to return a non-null value can + * override this method as appropriate. + */ + public Object getValue() { + return null; + } + + /** + * No-argument constructor + */ + public Token() {} + + /** + * Constructs a new token for the specified Image. + */ + public Token(int kind) + { + this(kind, null); + } + + /** + * Constructs a new token for the specified Image and Kind. + */ + public Token(int kind, String image) + { + this.kind = kind; + this.image = image; + } + + /** + * Returns the image. + */ + @Override + public String toString() + { + return image; + } + + /** + * Returns a new Token object, by default. However, if you want, you + * can create and return subclass objects based on the value of ofKind. + * Simply add the cases to the switch for all those special cases. + * For example, if you have a subclass of Token called IDToken that + * you want to create if ofKind is ID, simply add something like : + * + * case MyParserConstants.ID : return new IDToken(ofKind, image); + * + * to the following switch statement. Then you can cast matchedToken + * variable to the appropriate type and use sit in your lexical actions. + */ + public static Token newToken(int ofKind, String image) + { + switch(ofKind) + { + default : return new Token(ofKind, image); + } + } + + public static Token newToken(int ofKind) + { + return newToken(ofKind, null); + } + +} +/* JavaCC - OriginalChecksum=58822ef9712a51f2d9c4515900e3d21e (do not edit this line) */ diff --git a/unl-parser/src/main/java/unl/parser/TokenMgrError.java b/unl-parser/src/main/java/unl/parser/TokenMgrError.java new file mode 100644 index 0000000000000000000000000000000000000000..c4986ca6398d3ed11a4ae8e050fafa80e131235c --- /dev/null +++ b/unl-parser/src/main/java/unl/parser/TokenMgrError.java @@ -0,0 +1,147 @@ +/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 7.0 */ +/* JavaCCOptions: */ +package unl.parser; + +/** Token Manager Error. */ +public class TokenMgrError extends Error +{ + + /** + * The version identifier for this Serializable class. + * Increment only if the <i>serialized</i> form of the + * class changes. + */ + private static final long serialVersionUID = 1L; + + /* + * Ordinals for various reasons why an Error of this type can be thrown. + */ + + /** + * Lexical error occurred. + */ + public static final int LEXICAL_ERROR = 0; + + /** + * An attempt was made to create a second instance of a static token manager. + */ + public static final int STATIC_LEXER_ERROR = 1; + + /** + * Tried to change to an invalid lexical state. + */ + public static final int INVALID_LEXICAL_STATE = 2; + + /** + * Detected (and bailed out of) an infinite loop in the token manager. + */ + public static final int LOOP_DETECTED = 3; + + /** + * Indicates the reason why the exception is thrown. It will have + * one of the above 4 values. + */ + int errorCode; + + /** + * Replaces unprintable characters by their escaped (or unicode escaped) + * equivalents in the given string + */ + protected static final String addEscapes(String str) { + StringBuffer retval = new StringBuffer(); + char ch; + for (int i = 0; i < str.length(); i++) { + switch (str.charAt(i)) + { + case '\b': + retval.append("\\b"); + continue; + case '\t': + retval.append("\\t"); + continue; + case '\n': + retval.append("\\n"); + continue; + case '\f': + retval.append("\\f"); + continue; + case '\r': + retval.append("\\r"); + continue; + case '\"': + retval.append("\\\""); + continue; + case '\'': + retval.append("\\'"); + continue; + case '\\': + retval.append("\\\\"); + continue; + default: + if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { + String s = "0000" + Integer.toString(ch, 16); + retval.append("\\u" + s.substring(s.length() - 4)); + } else { + retval.append(ch); + } + continue; + } + } + return retval.toString(); + } + + /** + * Returns a detailed message for the Error when it is thrown by the + * token manager to indicate a lexical error. + * Parameters : + * EOFSeen : indicates if EOF caused the lexical error + * curLexState : lexical state in which this error occurred + * errorLine : line number when the error occurred + * errorColumn : column number when the error occurred + * errorAfter : prefix that was seen before this error occurred + * curchar : the offending character + * Note: You can customize the lexical error message by modifying this method. + */ + protected static String LexicalErr(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, int curChar) { + char curChar1 = (char)curChar; + return("Lexical error at line " + + errorLine + ", column " + + errorColumn + ". Encountered: " + + (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar1)) + "\"") + " (" + curChar + "), ") + + "after : \"" + addEscapes(errorAfter) + "\""); + } + + /** + * You can also modify the body of this method to customize your error messages. + * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not + * of end-users concern, so you can return something like : + * + * "Internal Error : Please file a bug report .... " + * + * from this method for such cases in the release version of your parser. + */ + @Override + public String getMessage() { + return super.getMessage(); + } + + /* + * Constructors of various flavors follow. + */ + + /** No arg constructor. */ + public TokenMgrError() { + } + + /** Constructor with message and reason. */ + public TokenMgrError(String message, int reason) { + super(message); + errorCode = reason; + } + + /** Full Constructor. */ + public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, int curChar, int reason) { + this(LexicalErr(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); + } +} +/* JavaCC - OriginalChecksum=c09f51496787f26c20a9264f22cebc60 (do not edit this line) */ diff --git a/unl-parser/src/main/java/unl/parser/UnlParser.java b/unl-parser/src/main/java/unl/parser/UnlParser.java new file mode 100644 index 0000000000000000000000000000000000000000..137a92516c76e23ccc701e93a9fcd9d162f98684 --- /dev/null +++ b/unl-parser/src/main/java/unl/parser/UnlParser.java @@ -0,0 +1,747 @@ +/* UnlParser.java */ +/* Generated By:JavaCC: Do not edit this line. UnlParser.java */ +package unl.parser; + +import unl.*; + +import java.util.Set; +import java.util.SortedSet; +import java.util.TreeSet; +import java.util.Vector; + +public class UnlParser implements UnlParserConstants { + + /* Test program */ + /*public static void main(String args[]) throws ParseException, Exception { + if (args.length != 1) throw new Exception("Please pass the file name as first and only arg."); + UnlParser parser = + new UnlParser(new BufferedReader(new InputStreamReader(new FileInputStream(args[0])))); + + parser.createUnlDocumentList(); + }*/ + + private final java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>(); + + final public UnlDocumentNode structuredElement() throws ParseException {Token t; + UnlDocumentNode sent; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case PARAGRAPH:{ + // Un document n'est pas structurĂ© au niveau de la grammaire. + // Il s'agit simplement d'une succession d'Ă©lĂ©ments. Seule la phrase + // et le titre sont dĂ©finis. + t = jj_consume_token(PARAGRAPH); +{if ("" != null) return new UnlDocumentNode(UnlDocumentNodeType.ParagraphStart, t.image);} + break; + } + case END_PARAGRAPH:{ + jj_consume_token(END_PARAGRAPH); +{if ("" != null) return new UnlDocumentNode(UnlDocumentNodeType.ParagraphEnd);} + break; + } + case TITLE:{ + sent = title(); +{if ("" != null) return sent;} + break; + } + case SENTENCE:{ + sent = sentence(); +{if ("" != null) return sent;} + break; + } + default: + jj_la1[4] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + throw new Error("Missing return statement in function"); + } + + final public UnlDocumentNode title() throws ParseException { + Graph g; + Token t; + t = jj_consume_token(TITLE); + g = relationList(); + jj_consume_token(END_TITLE); + { + if ("" != null) return new UnlDocumentNode(UnlDocumentNodeType.Title, t.image, g); + } + throw new Error("Missing return statement in function"); + } + + /** + * Generated Token Manager. + */ + public UnlParserTokenManager token_source; + /** + * Current token. + */ + public Token token; + /** + * Next token. + */ + public Token jj_nt; + SimpleCharStream jj_input_stream; + private int jj_ntk; + private int jj_gen; + private int[] jj_expentry; + private int jj_kind = -1; + + final public UnlDocumentNode sentence() throws ParseException { + Graph g; + Token t; + t = jj_consume_token(SENTENCE); + switch ((jj_ntk == -1) ? jj_ntk_f() : jj_ntk) { + case GENERIC_TOKEN: { + g = relationList(); + break; + } + case NODELIST: { + g = nodeAndRelations(); + break; + } + default: + jj_la1[5] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + jj_consume_token(END_SENTENCE); + { + if ("" != null) return new UnlDocumentNode(UnlDocumentNodeType.Sentence, t.image, g); + } + throw new Error("Missing return statement in function"); + } + + /*--------------------------------- + * Unl DOCUMENT STRUCTURE + *---------------------------------*/ + final public UnlDocument unlDocument() throws ParseException { + Token docLabel; + UnlDocument doc = null; + UnlDocumentNode node; + switch ((jj_ntk == -1) ? jj_ntk_f() : jj_ntk) { + case DOC: { + docLabel = jj_consume_token(DOC); + doc = new UnlDocument(docLabel.image); + break; + } + default: + jj_la1[0] = jj_gen; + } +// If there is no doc element, create it... + if (null == doc) { + doc = new UnlDocument("[D]"); + } + label_1: + while (true) { + try { + node = structuredElement(); + label_2: + while (true) { + switch ((jj_ntk == -1) ? jj_ntk_f() : jj_ntk) { + case DEUXPOINT: { + break; + } + default: + jj_la1[1] = jj_gen; + break label_2; + } + jj_consume_token(DEUXPOINT); + } + doc.add(node); + } catch (Exception ex) { + node = new UnlDocumentNode(ex.getMessage()); + doc.setError(ex.getMessage()); + doc.add(node); + } + switch ((jj_ntk == -1) ? jj_ntk_f() : jj_ntk) { + case PARAGRAPH: + case TITLE: + case SENTENCE: + case END_PARAGRAPH: { + break; + } + default: + jj_la1[2] = jj_gen; + break label_1; + } + } + switch ((jj_ntk == -1) ? jj_ntk_f() : jj_ntk) { + case END_DOC: { + jj_consume_token(END_DOC); + break; + } + default: + jj_la1[3] = jj_gen; + } + { + if ("" != null) return doc; + } + throw new Error("Missing return statement in function"); + } + + final public GraphRelation relation() throws ParseException { + Token rl; + Token subGraphNumber = null; + GraphNode n1, n2; + rl = jj_consume_token(GENERIC_TOKEN); + switch ((jj_ntk == -1) ? jj_ntk_f() : jj_ntk) { + case COLON_NUMBER: { + subGraphNumber = jj_consume_token(COLON_NUMBER); + break; + } + default: + jj_la1[7] = jj_gen; + } + jj_consume_token(PARO); + n1 = node(); + jj_consume_token(COMMA); + n2 = node(); + jj_consume_token(PARF); + if (null == subGraphNumber) { + if ("" != null) return new GraphRelation(n1, n2, rl.image); + } else { + if ("" != null) return new GraphRelation(n1, n2, rl.image, subGraphNumber.image); + } + throw new Error("Missing return statement in function"); + } + + final public Restriction restriction() throws ParseException { + Token label; + Token direction; + UniversalWord uw; + label = jj_consume_token(GENERIC_TOKEN); + switch ((jj_ntk == -1) ? jj_ntk_f() : jj_ntk) { + case CHEVRD: { + direction = jj_consume_token(CHEVRD); + break; + } + case CHEVRG: { + direction = jj_consume_token(CHEVRG); + break; + } + default: + jj_la1[15] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + uw = embeddedUniversalWord(label.image); + { + if ("" != null) return new Restriction(label.image, direction.image.charAt(0), uw); + } + throw new Error("Missing return statement in function"); + } + + /*--------------------------------- + * RELATIONS + *---------------------------------*/ + final public Graph relationList() throws ParseException { + GraphRelation rel; + Graph g = new Graph(); + label_3: + while (true) { + rel = relation(); + g.add(rel); + switch ((jj_ntk == -1) ? jj_ntk_f() : jj_ntk) { + case GENERIC_TOKEN: { + break; + } + default: + jj_la1[6] = jj_gen; + break label_3; + } + } + { + if ("" != null) return g; + } + throw new Error("Missing return statement in function"); + } + + final public SubGraphReferenceNode decoratedSubGraphNumber() throws ParseException { + Token num; + Set attr; + num = jj_consume_token(COLON_NUMBER); + attr = attributes(); + { + if ("" != null) return new SubGraphReferenceNode(num.image, attr); + } + throw new Error("Missing return statement in function"); + } + + /*--------------------------------- + * RULES FOR TESTS + *---------------------------------*/ + + /*--------------------------------- + * NODES AND RELATIONS ([W] syntax) + *---------------------------------*/ +// For the moment, only accept isolated node. + final public Graph nodeAndRelations() throws ParseException { + GraphNode n; + Graph g = new Graph(); + jj_consume_token(NODELIST); + n = node(); + jj_consume_token(END_NODELIST); + g.add(n); + { + if ("" != null) return g; + } + throw new Error("Missing return statement in function"); + } + + /*--------------------------------- + * DECORATED UW + *---------------------------------*/ + final public UniversalWordNode decoratedUniversalWord() throws ParseException { + UniversalWord uw; + Token num = null; + Set attr; + uw = universalWord(); + switch ((jj_ntk == -1) ? jj_ntk_f() : jj_ntk) { + case COLON_NUMBER: { + num = jj_consume_token(COLON_NUMBER); + break; + } + default: + jj_la1[9] = jj_gen; + } + attr = attributes(); + if (null == num) { + { + if ("" != null) return new UniversalWordNode(uw, attr); + } + } else { + { + if ("" != null) return new UniversalWordNode(uw, attr, num.image); + } + } + throw new Error("Missing return statement in function"); + } + + final public GraphNode node() throws ParseException { + UniversalWordNode uwn; + SubGraphReferenceNode sgn; + switch ((jj_ntk == -1) ? jj_ntk_f() : jj_ntk) { + case DBLQUOTED: + case GENERIC_TOKEN: { + uwn = decoratedUniversalWord(); + { + if ("" != null) return uwn; + } + break; + } + case COLON_NUMBER: { + sgn = decoratedSubGraphNumber(); + { + if ("" != null) return sgn; + } + break; + } + default: + jj_la1[8] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + throw new Error("Missing return statement in function"); + } + + /*--------------------------------- + * UNIVERSAL WORD + *---------------------------------*/ + final public UniversalWord universalWord() throws ParseException { + String hw; + SortedSet restrictions; + hw = headword(); + restrictions = restrictionList(); + { + if ("" != null) return new UniversalWord(hw, restrictions); + } + throw new Error("Missing return statement in function"); + } + + final public Set attributes() throws ParseException { + Set attr = new TreeSet(); + Token a; + label_4: + while (true) { + switch ((jj_ntk == -1) ? jj_ntk_f() : jj_ntk) { + case ATTR: { + break; + } + default: + jj_la1[10] = jj_gen; + break label_4; + } + a = jj_consume_token(ATTR); + attr.add(a.image); + } + { + if ("" != null) return attr; + } + throw new Error("Missing return statement in function"); + } + + final public String headword() throws ParseException { + Token t; + StringBuffer hw = new StringBuffer(); + label_5: + while (true) { + switch ((jj_ntk == -1) ? jj_ntk_f() : jj_ntk) { + case GENERIC_TOKEN: { + t = jj_consume_token(GENERIC_TOKEN); + hw.append(t.image); + hw.append(" "); + break; + } + case DBLQUOTED: { + t = jj_consume_token(DBLQUOTED); + hw.append(t.image); + hw.append(" "); + break; + } + default: + jj_la1[11] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + switch ((jj_ntk == -1) ? jj_ntk_f() : jj_ntk) { + case DBLQUOTED: + case GENERIC_TOKEN: { + break; + } + default: + jj_la1[12] = jj_gen; + break label_5; + } + } +int last = hw.length()-1; + if ((-1 != last) && (hw.charAt(last) == ' ')) { + hw.setLength(last); + } + {if ("" != null) return hw.toString();} + throw new Error("Missing return statement in function"); +} + + /* Putain de syntaxe Ă la con ! */ +/* Un UW dans une restriction n'a pas forcĂ©ment la mĂªme syntaxe qu'une UW + "normale". En effet, la restricition peut Ăªtre factorisĂ©e. */ + final public UniversalWord embeddedUniversalWord(String inheritedLabel) throws ParseException { + String hw; + SortedSet restrictions; + hw = headword(); + restrictions = embeddedRestrictionList(inheritedLabel); + { + if ("" != null) return new UniversalWord(hw, restrictions); + } + throw new Error("Missing return statement in function"); + } + + final public SortedSet restrictionList() throws ParseException { + Restriction r; + SortedSet restrictions = new TreeSet(); + switch ((jj_ntk == -1) ? jj_ntk_f() : jj_ntk) { + case PARO: { + jj_consume_token(PARO); + r = restriction(); + restrictions.add(r); + label_6: + while (true) { + switch ((jj_ntk == -1) ? jj_ntk_f() : jj_ntk) { + case COMMA: { + break; + } + default: + jj_la1[13] = jj_gen; + break label_6; + } + jj_consume_token(COMMA); + r = restriction(); + restrictions.add(r); + } + jj_consume_token(PARF); + break; + } + default: + jj_la1[14] = jj_gen; + } + { + if ("" != null) return restrictions; + } + throw new Error("Missing return statement in function"); + } + + /** + * List of universal words separated by commas. + */ + final public void universalWordList() throws ParseException { + decoratedUniversalWord(); + System.out.println("UW"); + switch ((jj_ntk == -1) ? jj_ntk_f() : jj_ntk) { + case COMMA: { + jj_consume_token(COMMA); + universalWordList(); + break; + } + default: + jj_la1[18] = jj_gen; + + } + jj_consume_token(0); + } + final private int[] jj_la1 = new int[20]; + static private int[] jj_la1_0; + static private int[] jj_la1_1; + static { + jj_la1_init_0(); + jj_la1_init_1(); + } + private static void jj_la1_init_0() { + jj_la1_0 = new int[] {0x40000,0x10000,0x1380000,0x800000,0x1380000,0x400000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000,0x800,0x6000,0x6000,0x6000,0x8000,0x13c0000,}; + } + private static void jj_la1_init_1() { + jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x0,0x20,0x20,0x8,0x38,0x8,0x40,0x30,0x30,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; + } + + /** Constructor with InputStream. */ + public UnlParser(java.io.InputStream stream) { + this(stream, null); + } + /** Constructor with InputStream and supplied encoding */ + public UnlParser(java.io.InputStream stream, String encoding) { + try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } + token_source = new UnlParserTokenManager(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 20; i++) jj_la1[i] = -1; + } + + /** Reinitialise. */ + public void ReInit(java.io.InputStream stream) { + ReInit(stream, null); + } + /** Reinitialise. */ + public void ReInit(java.io.InputStream stream, String encoding) { + try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } + token_source.ReInit(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 20; i++) jj_la1[i] = -1; + } + + /** Constructor. */ + public UnlParser(java.io.Reader stream) { + jj_input_stream = new SimpleCharStream(stream, 1, 1); + token_source = new UnlParserTokenManager(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 20; i++) jj_la1[i] = -1; + } + + /** Reinitialise. */ + public void ReInit(java.io.Reader stream) { + if (jj_input_stream == null) { + jj_input_stream = new SimpleCharStream(stream, 1, 1); + } else { + jj_input_stream.ReInit(stream, 1, 1); + } + if (token_source == null) { + token_source = new UnlParserTokenManager(jj_input_stream); + } + + token_source.ReInit(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 20; i++) jj_la1[i] = -1; + } + + /** Constructor with generated Token Manager. */ + public UnlParser(UnlParserTokenManager tm) { + token_source = tm; + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 20; i++) jj_la1[i] = -1; + } + + /** Reinitialise. */ + public void ReInit(UnlParserTokenManager tm) { + token_source = tm; + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 20; i++) jj_la1[i] = -1; + } + + private Token jj_consume_token(int kind) throws ParseException { + Token oldToken; + if ((oldToken = token).next != null) token = token.next; + else token = token.next = token_source.getNextToken(); + jj_ntk = -1; + if (token.kind == kind) { + jj_gen++; + return token; + } + token = oldToken; + jj_kind = kind; + throw generateParseException(); + } + + + /** + * Get the next Token. + */ + final public Token getNextToken() { + if (token.next != null) token = token.next; + else token = token.next = token_source.getNextToken(); + jj_ntk = -1; + jj_gen++; + return token; + } + + /** + * Simple unl graph. + */ + final public void isolatedUnlGraph() throws ParseException { + relationList(); + jj_consume_token(0); + } + + final public SortedSet embeddedRestrictionList(String inheritedLabel) throws ParseException { + UniversalWord uw; + SortedSet restrictions; + Token direction; + switch ((jj_ntk == -1) ? jj_ntk_f() : jj_ntk) { + case CHEVRD: + case CHEVRG: { + restrictions = new TreeSet(); + switch ((jj_ntk == -1) ? jj_ntk_f() : jj_ntk) { + case CHEVRD: { + direction = jj_consume_token(CHEVRD); + break; + } + case CHEVRG: { + direction = jj_consume_token(CHEVRG); + break; + } + default: + jj_la1[16] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + uw = embeddedUniversalWord(inheritedLabel); + restrictions.add(new Restriction(inheritedLabel, direction.image.charAt(0), uw)); + break; + } + default: + jj_la1[17] = jj_gen; + restrictions = restrictionList(); + } + { + if ("" != null) return restrictions; + } + throw new Error("Missing return statement in function"); + } + + /** + * Get the specific Token. + */ + final public Token getToken(int index) { + Token t = token; + for (int i = 0; i < index; i++) { + if (t.next != null) t = t.next; + else t = t.next = token_source.getNextToken(); + } + return t; + } + + private int jj_ntk_f() { + if ((jj_nt = token.next) == null) + return (jj_ntk = (token.next = token_source.getNextToken()).kind); + else + return (jj_ntk = jj_nt.kind); + } + + /** + * Main entry point: unl document List. + */ + final public Vector<UnlDocument> createUnlDocumentList() throws ParseException { + UnlDocument doc; + Vector<UnlDocument> list = new Vector<UnlDocument>(); + label_7: + while (true) { + doc = unlDocument(); + list.add(doc); + switch ((jj_ntk == -1) ? jj_ntk_f() : jj_ntk) { + case DOC: + case PARAGRAPH: + case TITLE: + case SENTENCE: + case END_PARAGRAPH: { + break; + } + default: + jj_la1[19] = jj_gen; + break label_7; + } + } + { + if ("" != null) return list; + } + throw new Error("Missing return statement in function"); + } + + /** + * Generate ParseException. + */ + public ParseException generateParseException() { + jj_expentries.clear(); + boolean[] la1tokens = new boolean[39]; + if (jj_kind >= 0) { + la1tokens[jj_kind] = true; + jj_kind = -1; + } + for (int i = 0; i < 20; i++) { + if (jj_la1[i] == jj_gen) { + for (int j = 0; j < 32; j++) { + if ((jj_la1_0[i] & (1 << j)) != 0) { + la1tokens[j] = true; + } + if ((jj_la1_1[i] & (1 << j)) != 0) { + la1tokens[32 + j] = true; + } + } + } + } + for (int i = 0; i < 39; i++) { + if (la1tokens[i]) { + jj_expentry = new int[1]; + jj_expentry[0] = i; + jj_expentries.add(jj_expentry); + } + } + int[][] exptokseq = new int[jj_expentries.size()][]; + for (int i = 0; i < jj_expentries.size(); i++) { + exptokseq[i] = jj_expentries.get(i); + } + return new ParseException(token, exptokseq, tokenImage); + } + + private boolean trace_enabled; + +/** Trace enabled. */ + final public boolean trace_enabled() { + return trace_enabled; + } + + /** Enable tracing. */ + final public void enable_tracing() { + } + + /** Disable tracing. */ + final public void disable_tracing() { + } + +} diff --git a/unl-parser/src/main/java/unl/parser/UnlParser.jj b/unl-parser/src/main/java/unl/parser/UnlParser.jj new file mode 100644 index 0000000000000000000000000000000000000000..cbfb2889616338abc5dc8c80a7ab2d1fb5013111 --- /dev/null +++ b/unl-parser/src/main/java/unl/parser/UnlParser.jj @@ -0,0 +1,565 @@ +/* + * unl_deconv_server + * + * UNL deconversion server © GETA-CLIPS-IMAG + * Gilles SĂ©rasset + *----------------------------------------------------------- + * $Id: UnlParser.jj,v 1.4 2008/11/27 15:57:01 nguyenht Exp $ + *----------------------------------------------------------- + * $Log: UnlParser.jj,v $ + * Revision 1.4 2008/11/27 15:57:01 nguyenht + * new UnlDeco with batch processing + * + * Revision 1.3 2003/11/20 16:04:56 serasset + * Suppressed a bug when an unknown unl attribute was used. + * Added support for Unl docs without [D] ... [/D] labels. + * Added support for isolated entry UW in graph [W] UW [W] syntax. + * + * Revision 1.2 2003/10/15 16:39:22 serasset + * Detection of non connected graphs. + * Resulting tree is now sent to the user. + * + * Revision 1.1.1.1 2003/10/13 14:01:13 serasset + * Creation of unldeco CVS repository. + * + */ + +/* + * The parser is not static as we will parse in multiple threads at the same time. + */ +options { + STATIC=false; + /* UNICODE_INPUT=true; */ // Apparement, signifie qu'il attend de l'unicode pur (2 bytes) + /* JAVA_UNICODE_ESCAPE=true; */ +} + +PARSER_BEGIN(UnlParser) + +package unl.parser; + +import java.io.FileInputStream; +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.util.SortedSet; +import java.util.TreeSet; +import java.util.Set; +import java.util.Vector; +import unl.*; + +public class UnlParser { + + /* Test program */ + public static void main(String args[]) throws ParseException, Exception { + if (args.length != 1) throw new Exception("Please pass the file name as first and only arg."); + UnlParser parser = + new UnlParser(new BufferedReader(new InputStreamReader(new FileInputStream(args[0])))); + + parser.createUnlDocumentList(); + } +} + +PARSER_END(UnlParser) + +TOKEN : /* Character classes */ +{ + <#ALPHA : ["A"-"Z"] | ["a"-"z"] > + | <#NUM : ( ["0"-"9"] ) > + | <#ALPHANUM : (<ALPHA> | <NUM> | "_" | "-" ) > + | <#WHITESPACES : " " | "\t" | " " > + // KNOWN BUG: if a headword ending with a . is immediately followed by a attribute (.@...) + // the grammar will choke on the @ character. This will be the case until I am able to + // make a lookahead in the tokenizer. + // QUESTION: Quels sont les caractères officiellement acceptĂ©s dans les headwords... + | <#HEADWORD_CHARACTERS : ( <ALPHANUM> | "'" | "#" | "&" | "/" | + ["\u00c0"-"\u00ff"] | + ("." ~["@"]) ) > + + // | <#HEADWORD_CHARACTERS : ( <ALPHANUM> | "'" | "#" | "&" | "/" | "+" | "@" | "=" | "$" | "�" | "�" | "[" | "]" | + // "\u221a" | "\u00a9" | + // "\u00ae" | "\u00a5" | + // "\u00ba" | + // "\u00ac" | "\u2265" | + // ["\u00c0"-"\u024f"] | + // // ["\u0021"-"\u005a"] | + // // ["\u005c"-"\u007f"] | + // // ["\u0080"-"\u00ff"] | + // // ["\u0100"-"\u017f"] | + // // "+" | "\u0024" | "\u00A2" | "\u00A3" | "\u00A4" | "\u00A5" | "\u09F2" | "\u09F3" | "\u0E3F" | "\u0E3F" | "\u17DB" | "\uFDFC" | "\u20AC" + // ("." ~["@"]) ) > +} + +SKIP : +{ + " " + | "\t" + | "\n" + | "\r" + | <COMMENT: ";" (~["\r","\n"])* ("\r"|"\n"|"\r\n")> // commentaires en ; ... \n +} + +TOKEN : /* Special symbols */ +{ + < PARO : "(" > + | < PARF : ")" > + | < CHEVRD : ">" > + | < CHEVRG : "<" > + | < COMMA : "," > + | < DEUXPOINT : ":" > + | < POURCENT : "%" > +} + + +TOKEN [IGNORE_CASE]: /* Unl document specific token */ +{ + < DOC : "[" (<WHITESPACES>)* "D" (":" (~["]"])*)? "]" > + | < PARAGRAPH : "[" (<WHITESPACES>)* "P" (":" (~["]"])*)? "]" > + | < TITLE : "[" (<WHITESPACES>)* "T" (":" (~["]"])*)? "]" > + | < SENTENCE : "[" (<WHITESPACES>)* "S" (":" (~["]"])*)? "]" > + | < NODELIST : "[" (<WHITESPACES>)* "W" (":" (~["]"])*)? "]" > + | < END_DOC : "[" (<WHITESPACES>)* "/D" (<WHITESPACES>)* "]" > + | < END_PARAGRAPH : "[" (<WHITESPACES>)* "/P" (<WHITESPACES>)* "]" > + | < END_TITLE : "[" (<WHITESPACES>)* "/T" (<WHITESPACES>)* "]" > + | < END_SENTENCE : "[" (<WHITESPACES>)* "/S" (<WHITESPACES>)* "]" > + | < END_NODELIST : "[" (<WHITESPACES>)* "/W" (<WHITESPACES>)* "]" > +} + +/* Unl multilingual document specific token */ +/* These token are treated as special tokens. Hence, they are allowed */ +/* Everywhere in the grammar, but also available during parsing if we */ +/* ever need them */ +MORE [IGNORE_CASE]: +{ + <"{org" (":" (<ALPHANUM>)*)? "}"> : WithinNLText + | + // Language codes are 2 letters Unl specific language codes. + <"{" <ALPHANUM> <ALPHANUM> "}"> : WithinNLText +} + +< WithinNLText> SPECIAL_TOKEN [IGNORE_CASE]: +{ + <"{/org}"> : DEFAULT + | + <"{/" <ALPHANUM> <ALPHANUM> "}"> : DEFAULT +} + +< WithinNLText> MORE: +{ + <~[]> +} + +SPECIAL_TOKEN [IGNORE_CASE]: +{ + <"{unl}"> +} + +SPECIAL_TOKEN [IGNORE_CASE]: +{ + <"{/unl}"> +} + + + +TOKEN : /* Unl specific token */ +{ +// < RELATION_LABEL : <ALPHA> <ALPHA> <ALPHA> > +// | +// La grammaire Unl spĂ©cifie clairement qu'un numĂ©ro a 2 chiffres (ou 2 lettres) +// Les graphes du GETA utilisent des numĂ©ros Ă 1 ou plusieurs chiffres... (A rectifier le cas Ă©chĂ©ant). + < COLON_NUMBER : ":" (<ALPHANUM>)+ > + | < DBLQUOTED : "\"" (~["\"", "\n", "\r"])* "\"" > + | < GENERIC_TOKEN : (< HEADWORD_CHARACTERS >)+ > + | < ATTR : ".@" (<ALPHANUM>)+ > +} + +/*--------------------------------- + * Unl DOCUMENT STRUCTURE + *---------------------------------*/ + +UnlDocument unlDocument() throws ParseException : +{ + Token docLabel; + UnlDocument doc = null; + UnlDocumentNode node; +} +{ + [ docLabel = <DOC> + { + doc = new UnlDocument(docLabel.image); + } ] + { + // If there is no doc element, create it... + if (null == doc) { doc = new UnlDocument("[D]"); } ; + } + + ( + try { + node = structuredElement() (<DEUXPOINT>)* + { + doc.add(node); + } + } catch (Exception ex) { + node = new UnlDocumentNode(ex.getMessage()); + doc.setError(ex.getMessage()); + doc.add(node); + } + )+ + [ <END_DOC> ] + { + return doc; + } +} + +UnlDocumentNode structuredElement(): +{ + Token t; + UnlDocumentNode sent; +} +{ + // Un document n'est pas structurĂ© au niveau de la grammaire. + // Il s'agit simplement d'une succession d'Ă©lĂ©ments. Seule la phrase + // et le titre sont dĂ©finis. + t = <PARAGRAPH> + { return new UnlDocumentNode(UnlDocumentNodeType.ParagraphStart, t.image); } + | + <END_PARAGRAPH> + { return new UnlDocumentNode(UnlDocumentNodeType.ParagraphEnd); } + | + sent = title() + { return sent; } + | + sent = sentence() + { return sent; } +} + +UnlDocumentNode title(): +{ +Graph g; +Token t; +} +{ + t = <TITLE> g = relationList() <END_TITLE> + { + return new UnlDocumentNode(UnlDocumentNodeType.Title, t.image, g); + } +} + +UnlDocumentNode sentence(): +{ +Graph g; +Token t; +} +{ + t = <SENTENCE> ( g = relationList() | g = nodeAndRelations() ) <END_SENTENCE> + { + return new UnlDocumentNode(UnlDocumentNodeType.Sentence, t.image, g); + } +} + + + +/*--------------------------------- + * RELATIONS + *---------------------------------*/ + +Graph relationList(): +{ + GraphRelation rel; + Graph g = new Graph(); +} +{ + ( rel = relation() + { + g.add(rel); + } + )+ + { + return g; + } +} + +GraphRelation relation(): +{ + Token rl; + Token subGraphNumber = null; + GraphNode n1, n2; +} +{ + rl = <GENERIC_TOKEN> [ subGraphNumber = <COLON_NUMBER> ] <PARO> n1 = node() <COMMA> n2 = node() <PARF> + { + if (null == subGraphNumber) + return new GraphRelation(n1, n2, rl.image); + else + return new GraphRelation(n1, n2, rl.image, subGraphNumber.image); + } +} + +GraphNode node(): +{ + UniversalWordNode uwn; + SubGraphReferenceNode sgn; +} +{ + uwn = decoratedUniversalWord() + { + return (GraphNode) uwn; + } + | + sgn = decoratedSubGraphNumber() + { + return (GraphNode) sgn; + } +} + +SubGraphReferenceNode decoratedSubGraphNumber(): +{ + Token num; + Set attr; +} +{ + num = <COLON_NUMBER> attr = attributes() + { + return new SubGraphReferenceNode(num.image, attr); + } +} + +/*--------------------------------- + * NODES AND RELATIONS ([W] syntax) + *---------------------------------*/ +// For the moment, only accept isolated node. +Graph nodeAndRelations(): +{ + GraphNode n; + Graph g = new Graph(); +} +{ + <NODELIST> + n = node() + <END_NODELIST> + { + g.add(n); + return g; + } +} + +/*--------------------------------- + * DECORATED UW + *---------------------------------*/ +UniversalWordNode decoratedUniversalWord() : +{ + UniversalWord uw; + Token num = null; + Set attr; +} +{ + uw = universalWord() + [ + num = <COLON_NUMBER> + ] + attr = attributes() + + { + if (null == num) { + return new UniversalWordNode(uw, attr); + } else { + return new UniversalWordNode(uw, attr, num.image); + } + } +} + +Set attributes(): +{ + Set attr = (Set) new TreeSet(); + Token a; +} +{ + ( + a = <ATTR> + { + attr.add(a.image); + } + ) * + { + return attr; + } +} + +/*--------------------------------- + * UNIVERSAL WORD + *---------------------------------*/ + +UniversalWord universalWord(): +{ +String hw; +SortedSet restrictions; +} +{ + hw = headword() restrictions = restrictionList() + { + return new UniversalWord(hw, restrictions); + } +} + +String headword(): +{ + Token t; + StringBuffer hw = new StringBuffer(); +} +{ + + ( + t = <GENERIC_TOKEN> + { + hw.append(t.image); + hw.append(" "); + } + | + t = <DBLQUOTED> + { + hw.append(t.image); + hw.append(" "); + } + )+ + { + int last = hw.length()-1; + if ((-1 != last) && (hw.charAt(last) == ' ')) { + hw.setLength(last); + } + return hw.toString(); + } +} + +SortedSet restrictionList(): +{ + Restriction r; + SortedSet restrictions = (SortedSet) new TreeSet(); +} +{ + [ + <PARO> + r = restriction() + { restrictions.add(r); } + ( + <COMMA> r = restriction() + { restrictions.add(r); } + )* + <PARF> + ] + { + return restrictions; + } +} + + +Restriction restriction(): +{ + Token label; + Token direction; + UniversalWord uw; +} +{ + label = <GENERIC_TOKEN> + ( + direction = <CHEVRD> | + direction = <CHEVRG> + ) + uw = embeddedUniversalWord(label.image) + { + return new Restriction(label.image, direction.image.charAt(0), uw); + } +} + +/* Putain de syntaxe Ă la con ! */ +/* Un UW dans une restriction n'a pas forcĂ©ment la mĂªme syntaxe qu'une UW + "normale". En effet, la restricition peut Ăªtre factorisĂ©e. */ +UniversalWord embeddedUniversalWord(String inheritedLabel): +{ + String hw; + SortedSet restrictions; +} +{ + hw = headword() restrictions = embeddedRestrictionList(inheritedLabel) + { + return new UniversalWord(hw, restrictions); + } +} + +SortedSet embeddedRestrictionList(String inheritedLabel): +{ + UniversalWord uw; + SortedSet restrictions; + Token direction; +} +{ + ( + { + restrictions = (SortedSet) new TreeSet(); + } + ( direction = <CHEVRD> | direction = <CHEVRG> ) + uw = embeddedUniversalWord(inheritedLabel) + { + restrictions.add(new Restriction(inheritedLabel, direction.image.charAt(0), uw)); + } + | + restrictions = restrictionList() + ) + { + return restrictions; + } +} + +/*--------------------------------- + * RULES FOR TESTS + *---------------------------------*/ + +/** + * List of universal words separated by commas. + */ +void universalWordList() : +{ +} +{ + decoratedUniversalWord() + { + System.out.println("UW"); + } + ( + <COMMA> universalWordList() + | + { + } + ) <EOF> +} + +/** + * Simple unl graph. + */ +void isolatedUnlGraph() : +{ +} +{ + relationList() + <EOF> +} + +/** + * Main entry point: unl document List. + */ +Vector<UnlDocument> createUnlDocumentList() : +{ +UnlDocument doc; +Vector<UnlDocument> list = new Vector<UnlDocument>(); +} +{ + ( + doc = unlDocument() + { + list.add(doc); + } + )+ + { + return list; + } + +} + + diff --git a/unl-parser/src/main/java/unl/parser/UnlParserConstants.java b/unl-parser/src/main/java/unl/parser/UnlParserConstants.java new file mode 100644 index 0000000000000000000000000000000000000000..80dd8d65a8c17cb3473eac3262d8fb85795d9087 --- /dev/null +++ b/unl-parser/src/main/java/unl/parser/UnlParserConstants.java @@ -0,0 +1,116 @@ +/* Generated By:JavaCC: Do not edit this line. UnlParserConstants.java */ +package unl.parser; + + +/** + * Token literal values and constants. + * Generated by org.javacc.parser.OtherFilesGen#start() + */ +public interface UnlParserConstants { + + /** End of File. */ + int EOF = 0; + /** RegularExpression Id. */ + int ALPHA = 1; + /** RegularExpression Id. */ + int NUM = 2; + /** RegularExpression Id. */ + int ALPHANUM = 3; + /** RegularExpression Id. */ + int WHITESPACES = 4; + /** RegularExpression Id. */ + int HEADWORD_CHARACTERS = 5; + /** RegularExpression Id. */ + int COMMENT = 10; + /** RegularExpression Id. */ + int PARO = 11; + /** RegularExpression Id. */ + int PARF = 12; + /** RegularExpression Id. */ + int CHEVRD = 13; + /** RegularExpression Id. */ + int CHEVRG = 14; + /** RegularExpression Id. */ + int COMMA = 15; + /** RegularExpression Id. */ + int DEUXPOINT = 16; + /** RegularExpression Id. */ + int POURCENT = 17; + /** RegularExpression Id. */ + int DOC = 18; + /** RegularExpression Id. */ + int PARAGRAPH = 19; + /** RegularExpression Id. */ + int TITLE = 20; + /** RegularExpression Id. */ + int SENTENCE = 21; + /** RegularExpression Id. */ + int NODELIST = 22; + /** RegularExpression Id. */ + int END_DOC = 23; + /** RegularExpression Id. */ + int END_PARAGRAPH = 24; + /** RegularExpression Id. */ + int END_TITLE = 25; + /** RegularExpression Id. */ + int END_SENTENCE = 26; + /** RegularExpression Id. */ + int END_NODELIST = 27; + /** RegularExpression Id. */ + int COLON_NUMBER = 35; + /** RegularExpression Id. */ + int DBLQUOTED = 36; + /** RegularExpression Id. */ + int GENERIC_TOKEN = 37; + /** RegularExpression Id. */ + int ATTR = 38; + + /** Lexical state. */ + int DEFAULT = 0; + /** Lexical state. */ + int WithinNLText = 1; + + /** Literal token values. */ + String[] tokenImage = { + "<EOF>", + "<ALPHA>", + "<NUM>", + "<ALPHANUM>", + "<WHITESPACES>", + "<HEADWORD_CHARACTERS>", + "\" \"", + "\"\\t\"", + "\"\\n\"", + "\"\\r\"", + "<COMMENT>", + "\"(\"", + "\")\"", + "\">\"", + "\"<\"", + "\",\"", + "\":\"", + "\"%\"", + "<DOC>", + "<PARAGRAPH>", + "<TITLE>", + "<SENTENCE>", + "<NODELIST>", + "<END_DOC>", + "<END_PARAGRAPH>", + "<END_TITLE>", + "<END_SENTENCE>", + "<END_NODELIST>", + "<token of kind 28>", + "<token of kind 29>", + "\"{/org}\"", + "<token of kind 31>", + "<token of kind 32>", + "\"{unl}\"", + "\"{/unl}\"", + "<COLON_NUMBER>", + "<DBLQUOTED>", + "<GENERIC_TOKEN>", + "<ATTR>", + }; + +} diff --git a/unl-parser/src/main/java/unl/parser/UnlParserTokenManager.java b/unl-parser/src/main/java/unl/parser/UnlParserTokenManager.java new file mode 100644 index 0000000000000000000000000000000000000000..e682c2f3c3c44b07a3c53bb49c145a66d0485666 --- /dev/null +++ b/unl-parser/src/main/java/unl/parser/UnlParserTokenManager.java @@ -0,0 +1,1291 @@ +/* UnlParserTokenManager.java */ +/* Generated By:JavaCC: Do not edit this line. UnlParserTokenManager.java */ +package unl.parser; +import java.io.FileInputStream; +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.util.SortedSet; +import java.util.TreeSet; +import java.util.Set; +import java.util.Vector; +import unl.*; + +/** Token Manager. */ +@SuppressWarnings ("unused") +public class UnlParserTokenManager implements UnlParserConstants { + + /** Debug output. */ + public java.io.PrintStream debugStream = System.out; + /** Set debug output. */ + public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } +private int jjStopAtPos(int pos, int kind) +{ + jjmatchedKind = kind; + jjmatchedPos = pos; + return pos + 1; +} +private int jjMoveStringLiteralDfa0_0(){ + switch(curChar) + { + case 9: + jjmatchedKind = 7; + return jjMoveNfa_0(0, 0); + case 10: + jjmatchedKind = 8; + return jjMoveNfa_0(0, 0); + case 13: + jjmatchedKind = 9; + return jjMoveNfa_0(0, 0); + case 32: + jjmatchedKind = 6; + return jjMoveNfa_0(0, 0); + case 37: + jjmatchedKind = 17; + return jjMoveNfa_0(0, 0); + case 40: + jjmatchedKind = 11; + return jjMoveNfa_0(0, 0); + case 41: + jjmatchedKind = 12; + return jjMoveNfa_0(0, 0); + case 44: + jjmatchedKind = 15; + return jjMoveNfa_0(0, 0); + case 58: + jjmatchedKind = 16; + return jjMoveNfa_0(0, 0); + case 60: + jjmatchedKind = 14; + return jjMoveNfa_0(0, 0); + case 62: + jjmatchedKind = 13; + return jjMoveNfa_0(0, 0); + case 123: + return jjMoveStringLiteralDfa1_0(0x600000000L); + default : + return jjMoveNfa_0(0, 0); + } +} +private int jjMoveStringLiteralDfa1_0(long active0){ + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + return jjMoveNfa_0(0, 0); + } + switch(curChar) + { + case 47: + return jjMoveStringLiteralDfa2_0(active0, 0x400000000L); + case 85: + return jjMoveStringLiteralDfa2_0(active0, 0x200000000L); + case 117: + return jjMoveStringLiteralDfa2_0(active0, 0x200000000L); + default : + break; + } + return jjMoveNfa_0(0, 1); +} +private int jjMoveStringLiteralDfa2_0(long old0, long active0){ + if (((active0 &= old0)) == 0L) + return jjMoveNfa_0(0, 1); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + return jjMoveNfa_0(0, 1); + } + switch(curChar) + { + case 78: + return jjMoveStringLiteralDfa3_0(active0, 0x200000000L); + case 85: + return jjMoveStringLiteralDfa3_0(active0, 0x400000000L); + case 110: + return jjMoveStringLiteralDfa3_0(active0, 0x200000000L); + case 117: + return jjMoveStringLiteralDfa3_0(active0, 0x400000000L); + default : + break; + } + return jjMoveNfa_0(0, 2); +} +private int jjMoveStringLiteralDfa3_0(long old0, long active0){ + if (((active0 &= old0)) == 0L) + return jjMoveNfa_0(0, 2); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + return jjMoveNfa_0(0, 2); + } + switch(curChar) + { + case 76: + return jjMoveStringLiteralDfa4_0(active0, 0x200000000L); + case 78: + return jjMoveStringLiteralDfa4_0(active0, 0x400000000L); + case 108: + return jjMoveStringLiteralDfa4_0(active0, 0x200000000L); + case 110: + return jjMoveStringLiteralDfa4_0(active0, 0x400000000L); + default : + break; + } + return jjMoveNfa_0(0, 3); +} +private int jjMoveStringLiteralDfa4_0(long old0, long active0){ + if (((active0 &= old0)) == 0L) + return jjMoveNfa_0(0, 3); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + return jjMoveNfa_0(0, 3); + } + switch(curChar) + { + case 76: + return jjMoveStringLiteralDfa5_0(active0, 0x400000000L); + case 108: + return jjMoveStringLiteralDfa5_0(active0, 0x400000000L); + case 125: + if ((active0 & 0x200000000L) != 0L) + { + jjmatchedKind = 33; + jjmatchedPos = 4; + } + break; + default : + break; + } + return jjMoveNfa_0(0, 4); +} +private int jjMoveStringLiteralDfa5_0(long old0, long active0){ + if (((active0 &= old0)) == 0L) + return jjMoveNfa_0(0, 4); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + return jjMoveNfa_0(0, 4); + } + switch(curChar) + { + case 125: + if ((active0 & 0x400000000L) != 0L) + { + jjmatchedKind = 34; + jjmatchedPos = 5; + } + break; + default : + break; + } + return jjMoveNfa_0(0, 5); +} +static final long[] jjbitVec0 = { + 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL +}; +static final long[] jjbitVec1 = { + 0x0L, 0x0L, 0x0L, 0xffffffffffffffffL +}; +static final long[] jjbitVec2 = { + 0x0L, 0x0L, 0x100000000L, 0x0L +}; +private int jjMoveNfa_0(int startState, int curPos) +{ + int strKind = jjmatchedKind; + int strPos = jjmatchedPos; + int seenUpto; + input_stream.backup(seenUpto = curPos + 1); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { throw new Error("Internal Error"); } + curPos = 0; + int startsAt = 0; + jjnewStateCnt = 78; + int i = 1; + jjstateSet[0] = startState; + int kind = 0x7fffffff; + for (;;) + { + if (++jjround == 0x7fffffff) + ReInitRounds(); + if (curChar < 64) + { + long l = 1L << curChar; + do + { + switch(jjstateSet[--i]) + { + case 0: + if ((0x3ffa0c800000000L & l) != 0L) + { + if (kind > 37) + kind = 37; + { jjCheckNAddTwoStates(21, 22); } + } + else if (curChar == 46) + jjstateSet[jjnewStateCnt++] = 24; + else if (curChar == 34) + { jjCheckNAddTwoStates(19, 20); } + else if (curChar == 58) + { jjCheckNAdd(17); } + else if (curChar == 59) + { jjCheckNAddStates(0, 2); } + if (curChar == 46) + jjstateSet[jjnewStateCnt++] = 23; + break; + case 1: + if ((0xffffffffffffdbffL & l) != 0L) + { jjCheckNAddStates(0, 2); } + break; + case 2: + if ((0x2400L & l) != 0L && kind > 10) + kind = 10; + break; + case 3: + if (curChar == 10 && kind > 10) + kind = 10; + break; + case 4: + if (curChar == 13) + jjstateSet[jjnewStateCnt++] = 3; + break; + case 6: + if (curChar == 58) + { jjCheckNAddTwoStates(7, 8); } + break; + case 7: + if ((0x3ff200000000000L & l) != 0L) + { jjCheckNAddTwoStates(7, 8); } + break; + case 13: + if ((0x3ff200000000000L & l) != 0L) + jjstateSet[jjnewStateCnt++] = 14; + break; + case 14: + if ((0x3ff200000000000L & l) != 0L) + jjstateSet[jjnewStateCnt++] = 15; + break; + case 16: + if (curChar == 58) + { jjCheckNAdd(17); } + break; + case 17: + if ((0x3ff200000000000L & l) == 0L) + break; + if (kind > 35) + kind = 35; + { jjCheckNAdd(17); } + break; + case 18: + if (curChar == 34) + { jjCheckNAddTwoStates(19, 20); } + break; + case 19: + if ((0xfffffffbffffdbffL & l) != 0L) + { jjCheckNAddTwoStates(19, 20); } + break; + case 20: + if (curChar == 34 && kind > 36) + kind = 36; + break; + case 21: + if ((0x3ffa0c800000000L & l) == 0L) + break; + if (kind > 37) + kind = 37; + { jjCheckNAddTwoStates(21, 22); } + break; + case 22: + if (curChar == 46) + jjstateSet[jjnewStateCnt++] = 23; + break; + case 23: + if (kind > 37) + kind = 37; + { jjCheckNAddTwoStates(21, 22); } + break; + case 25: + if ((0x3ff200000000000L & l) == 0L) + break; + if (kind > 38) + kind = 38; + jjstateSet[jjnewStateCnt++] = 25; + break; + case 26: + if (curChar == 46) + jjstateSet[jjnewStateCnt++] = 24; + break; + case 28: + if ((0x100000200L & l) != 0L) + { jjAddStates(3, 4); } + break; + case 30: + if (curChar == 58) + { jjCheckNAddTwoStates(31, 32); } + break; + case 31: + { jjCheckNAddTwoStates(31, 32); } + break; + case 33: + if ((0x100000200L & l) != 0L) + { jjAddStates(5, 6); } + break; + case 35: + if (curChar == 58) + { jjCheckNAddTwoStates(36, 37); } + break; + case 36: + { jjCheckNAddTwoStates(36, 37); } + break; + case 38: + if ((0x100000200L & l) != 0L) + { jjAddStates(7, 8); } + break; + case 40: + if (curChar == 58) + { jjCheckNAddTwoStates(41, 42); } + break; + case 41: + { jjCheckNAddTwoStates(41, 42); } + break; + case 43: + if ((0x100000200L & l) != 0L) + { jjAddStates(9, 10); } + break; + case 45: + if (curChar == 58) + { jjCheckNAddTwoStates(46, 47); } + break; + case 46: + { jjCheckNAddTwoStates(46, 47); } + break; + case 48: + if ((0x100000200L & l) != 0L) + { jjAddStates(11, 12); } + break; + case 50: + if (curChar == 58) + { jjCheckNAddTwoStates(51, 52); } + break; + case 51: + { jjCheckNAddTwoStates(51, 52); } + break; + case 53: + if ((0x100000200L & l) != 0L) + { jjAddStates(13, 14); } + break; + case 55: + if ((0x100000200L & l) != 0L) + { jjAddStates(15, 16); } + break; + case 57: + if (curChar == 47) + jjstateSet[jjnewStateCnt++] = 54; + break; + case 58: + if ((0x100000200L & l) != 0L) + { jjAddStates(17, 18); } + break; + case 60: + if ((0x100000200L & l) != 0L) + { jjAddStates(19, 20); } + break; + case 62: + if (curChar == 47) + jjstateSet[jjnewStateCnt++] = 59; + break; + case 63: + if ((0x100000200L & l) != 0L) + { jjAddStates(21, 22); } + break; + case 65: + if ((0x100000200L & l) != 0L) + { jjAddStates(23, 24); } + break; + case 67: + if (curChar == 47) + jjstateSet[jjnewStateCnt++] = 64; + break; + case 68: + if ((0x100000200L & l) != 0L) + { jjAddStates(25, 26); } + break; + case 70: + if ((0x100000200L & l) != 0L) + { jjAddStates(27, 28); } + break; + case 72: + if (curChar == 47) + jjstateSet[jjnewStateCnt++] = 69; + break; + case 73: + if ((0x100000200L & l) != 0L) + { jjAddStates(29, 30); } + break; + case 75: + if ((0x100000200L & l) != 0L) + { jjAddStates(31, 32); } + break; + case 77: + if (curChar == 47) + jjstateSet[jjnewStateCnt++] = 74; + break; + default : break; + } + } while(i != startsAt); + } + else if (curChar < 128) + { + long l = 1L << (curChar & 077); + do + { + switch(jjstateSet[--i]) + { + case 0: + if ((0x7fffffe87fffffeL & l) != 0L) + { + if (kind > 37) + kind = 37; + { jjCheckNAddTwoStates(21, 22); } + } + else if (curChar == 91) + { jjAddStates(33, 52); } + else if (curChar == 123) + jjstateSet[jjnewStateCnt++] = 13; + if (curChar == 123) + jjstateSet[jjnewStateCnt++] = 10; + break; + case 1: + { jjAddStates(0, 2); } + break; + case 5: + if ((0x8000000080L & l) != 0L) + { jjCheckNAddTwoStates(6, 8); } + break; + case 7: + if ((0x7fffffe87fffffeL & l) != 0L) + { jjCheckNAddTwoStates(7, 8); } + break; + case 8: + if (curChar == 125 && kind > 28) + kind = 28; + break; + case 9: + if ((0x4000000040000L & l) != 0L) + jjstateSet[jjnewStateCnt++] = 5; + break; + case 10: + if ((0x800000008000L & l) != 0L) + jjstateSet[jjnewStateCnt++] = 9; + break; + case 11: + if (curChar == 123) + jjstateSet[jjnewStateCnt++] = 10; + break; + case 12: + if (curChar == 123) + jjstateSet[jjnewStateCnt++] = 13; + break; + case 13: + if ((0x7fffffe87fffffeL & l) != 0L) + jjstateSet[jjnewStateCnt++] = 14; + break; + case 14: + if ((0x7fffffe87fffffeL & l) != 0L) + jjstateSet[jjnewStateCnt++] = 15; + break; + case 15: + if (curChar == 125 && kind > 29) + kind = 29; + break; + case 17: + if ((0x7fffffe87fffffeL & l) == 0L) + break; + if (kind > 35) + kind = 35; + jjstateSet[jjnewStateCnt++] = 17; + break; + case 19: + { jjAddStates(53, 54); } + break; + case 21: + if ((0x7fffffe87fffffeL & l) == 0L) + break; + if (kind > 37) + kind = 37; + { jjCheckNAddTwoStates(21, 22); } + break; + case 23: + if ((0xfffffffffffffffeL & l) == 0L) + break; + if (kind > 37) + kind = 37; + { jjCheckNAddTwoStates(21, 22); } + break; + case 24: + if (curChar == 64) + { jjCheckNAdd(25); } + break; + case 25: + if ((0x7fffffe87fffffeL & l) == 0L) + break; + if (kind > 38) + kind = 38; + { jjCheckNAdd(25); } + break; + case 27: + if (curChar == 91) + { jjAddStates(33, 52); } + break; + case 29: + if ((0x1000000010L & l) != 0L) + { jjCheckNAddTwoStates(30, 32); } + break; + case 31: + if ((0xffffffffdfffffffL & l) != 0L) + { jjCheckNAddTwoStates(31, 32); } + break; + case 32: + if (curChar == 93 && kind > 18) + kind = 18; + break; + case 34: + if ((0x1000000010000L & l) != 0L) + { jjCheckNAddTwoStates(35, 37); } + break; + case 36: + if ((0xffffffffdfffffffL & l) != 0L) + { jjCheckNAddTwoStates(36, 37); } + break; + case 37: + if (curChar == 93 && kind > 19) + kind = 19; + break; + case 39: + if ((0x10000000100000L & l) != 0L) + { jjCheckNAddTwoStates(40, 42); } + break; + case 41: + if ((0xffffffffdfffffffL & l) != 0L) + { jjCheckNAddTwoStates(41, 42); } + break; + case 42: + if (curChar == 93 && kind > 20) + kind = 20; + break; + case 44: + if ((0x8000000080000L & l) != 0L) + { jjCheckNAddTwoStates(45, 47); } + break; + case 46: + if ((0xffffffffdfffffffL & l) != 0L) + { jjCheckNAddTwoStates(46, 47); } + break; + case 47: + if (curChar == 93 && kind > 21) + kind = 21; + break; + case 49: + if ((0x80000000800000L & l) != 0L) + { jjCheckNAddTwoStates(50, 52); } + break; + case 51: + if ((0xffffffffdfffffffL & l) != 0L) + { jjCheckNAddTwoStates(51, 52); } + break; + case 52: + if (curChar == 93 && kind > 22) + kind = 22; + break; + case 54: + if ((0x1000000010L & l) != 0L) + { jjAddStates(15, 16); } + break; + case 56: + if (curChar == 93 && kind > 23) + kind = 23; + break; + case 59: + if ((0x1000000010000L & l) != 0L) + { jjAddStates(19, 20); } + break; + case 61: + if (curChar == 93 && kind > 24) + kind = 24; + break; + case 64: + if ((0x10000000100000L & l) != 0L) + { jjAddStates(23, 24); } + break; + case 66: + if (curChar == 93 && kind > 25) + kind = 25; + break; + case 69: + if ((0x8000000080000L & l) != 0L) + { jjAddStates(27, 28); } + break; + case 71: + if (curChar == 93 && kind > 26) + kind = 26; + break; + case 74: + if ((0x80000000800000L & l) != 0L) + { jjAddStates(31, 32); } + break; + case 76: + if (curChar == 93 && kind > 27) + kind = 27; + break; + default : break; + } + } while(i != startsAt); + } + else + { + int i2 = (curChar & 0xff) >> 6; + long l2 = 1L << (curChar & 077); + do + { + switch(jjstateSet[--i]) + { + case 0: + case 21: + if ((jjbitVec1[i2] & l2) == 0L) + break; + if (kind > 37) + kind = 37; + { jjCheckNAddTwoStates(21, 22); } + break; + case 1: + if ((jjbitVec0[i2] & l2) != 0L) + { jjAddStates(0, 2); } + break; + case 19: + if ((jjbitVec0[i2] & l2) != 0L) + { jjAddStates(53, 54); } + break; + case 23: + if ((jjbitVec0[i2] & l2) == 0L) + break; + if (kind > 37) + kind = 37; + { jjCheckNAddTwoStates(21, 22); } + break; + case 28: + if ((jjbitVec2[i2] & l2) != 0L) + { jjAddStates(3, 4); } + break; + case 31: + if ((jjbitVec0[i2] & l2) != 0L) + { jjAddStates(55, 56); } + break; + case 33: + if ((jjbitVec2[i2] & l2) != 0L) + { jjAddStates(5, 6); } + break; + case 36: + if ((jjbitVec0[i2] & l2) != 0L) + { jjAddStates(57, 58); } + break; + case 38: + if ((jjbitVec2[i2] & l2) != 0L) + { jjAddStates(7, 8); } + break; + case 41: + if ((jjbitVec0[i2] & l2) != 0L) + { jjAddStates(59, 60); } + break; + case 43: + if ((jjbitVec2[i2] & l2) != 0L) + { jjAddStates(9, 10); } + break; + case 46: + if ((jjbitVec0[i2] & l2) != 0L) + { jjAddStates(61, 62); } + break; + case 48: + if ((jjbitVec2[i2] & l2) != 0L) + { jjAddStates(11, 12); } + break; + case 51: + if ((jjbitVec0[i2] & l2) != 0L) + { jjAddStates(63, 64); } + break; + case 53: + if ((jjbitVec2[i2] & l2) != 0L) + { jjAddStates(13, 14); } + break; + case 55: + if ((jjbitVec2[i2] & l2) != 0L) + { jjAddStates(15, 16); } + break; + case 58: + if ((jjbitVec2[i2] & l2) != 0L) + { jjAddStates(17, 18); } + break; + case 60: + if ((jjbitVec2[i2] & l2) != 0L) + { jjAddStates(19, 20); } + break; + case 63: + if ((jjbitVec2[i2] & l2) != 0L) + { jjAddStates(21, 22); } + break; + case 65: + if ((jjbitVec2[i2] & l2) != 0L) + { jjAddStates(23, 24); } + break; + case 68: + if ((jjbitVec2[i2] & l2) != 0L) + { jjAddStates(25, 26); } + break; + case 70: + if ((jjbitVec2[i2] & l2) != 0L) + { jjAddStates(27, 28); } + break; + case 73: + if ((jjbitVec2[i2] & l2) != 0L) + { jjAddStates(29, 30); } + break; + case 75: + if ((jjbitVec2[i2] & l2) != 0L) + { jjAddStates(31, 32); } + break; + default : break; + } + } while(i != startsAt); + } + if (kind != 0x7fffffff) + { + jjmatchedKind = kind; + jjmatchedPos = curPos; + kind = 0x7fffffff; + } + ++curPos; + if ((i = jjnewStateCnt) == (startsAt = 78 - (jjnewStateCnt = startsAt))) + break; + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { break; } + } + if (jjmatchedPos > strPos) + return curPos; + + int toRet = Math.max(curPos, seenUpto); + + if (curPos < toRet) + for (i = toRet - Math.min(curPos, seenUpto); i-- > 0; ) + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { throw new Error("Internal Error : Please send a bug report."); } + + if (jjmatchedPos < strPos) + { + jjmatchedKind = strKind; + jjmatchedPos = strPos; + } + else if (jjmatchedPos == strPos && jjmatchedKind > strKind) + jjmatchedKind = strKind; + + return toRet; +} +private final int jjStopStringLiteralDfa_1(int pos, long active0){ + switch (pos) + { + case 0: + if ((active0 & 0x40000000L) != 0L) + return 0; + return -1; + case 1: + if ((active0 & 0x40000000L) != 0L) + return 1; + return -1; + case 2: + if ((active0 & 0x40000000L) != 0L) + return 2; + return -1; + case 3: + if ((active0 & 0x40000000L) != 0L) + return 3; + return -1; + default : + return -1; + } +} +private final int jjStartNfa_1(int pos, long active0){ + return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0), pos + 1); +} +private int jjMoveStringLiteralDfa0_1(){ + switch(curChar) + { + case 123: + return jjMoveStringLiteralDfa1_1(0x40000000L); + default : + return jjMoveNfa_1(4, 0); + } +} +private int jjMoveStringLiteralDfa1_1(long active0){ + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_1(0, active0); + return 1; + } + switch(curChar) + { + case 47: + return jjMoveStringLiteralDfa2_1(active0, 0x40000000L); + default : + break; + } + return jjStartNfa_1(0, active0); +} +private int jjMoveStringLiteralDfa2_1(long old0, long active0){ + if (((active0 &= old0)) == 0L) + return jjStartNfa_1(0, old0); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_1(1, active0); + return 2; + } + switch(curChar) + { + case 79: + return jjMoveStringLiteralDfa3_1(active0, 0x40000000L); + case 111: + return jjMoveStringLiteralDfa3_1(active0, 0x40000000L); + default : + break; + } + return jjStartNfa_1(1, active0); +} +private int jjMoveStringLiteralDfa3_1(long old0, long active0){ + if (((active0 &= old0)) == 0L) + return jjStartNfa_1(1, old0); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_1(2, active0); + return 3; + } + switch(curChar) + { + case 82: + return jjMoveStringLiteralDfa4_1(active0, 0x40000000L); + case 114: + return jjMoveStringLiteralDfa4_1(active0, 0x40000000L); + default : + break; + } + return jjStartNfa_1(2, active0); +} +private int jjMoveStringLiteralDfa4_1(long old0, long active0){ + if (((active0 &= old0)) == 0L) + return jjStartNfa_1(2, old0); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_1(3, active0); + return 4; + } + switch(curChar) + { + case 71: + return jjMoveStringLiteralDfa5_1(active0, 0x40000000L); + case 103: + return jjMoveStringLiteralDfa5_1(active0, 0x40000000L); + default : + break; + } + return jjStartNfa_1(3, active0); +} +private int jjMoveStringLiteralDfa5_1(long old0, long active0){ + if (((active0 &= old0)) == 0L) + return jjStartNfa_1(3, old0); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_1(4, active0); + return 5; + } + switch(curChar) + { + case 125: + if ((active0 & 0x40000000L) != 0L) + return jjStopAtPos(5, 30); + break; + default : + break; + } + return jjStartNfa_1(4, active0); +} +private int jjMoveNfa_1(int startState, int curPos) +{ + int startsAt = 0; + jjnewStateCnt = 5; + int i = 1; + jjstateSet[0] = startState; + int kind = 0x7fffffff; + for (;;) + { + if (++jjround == 0x7fffffff) + ReInitRounds(); + if (curChar < 64) + { + long l = 1L << curChar; + do + { + switch(jjstateSet[--i]) + { + case 0: + if (curChar == 47) + jjstateSet[jjnewStateCnt++] = 1; + break; + case 1: + if ((0x3ff200000000000L & l) != 0L) + jjstateSet[jjnewStateCnt++] = 2; + break; + case 2: + if ((0x3ff200000000000L & l) != 0L) + jjstateSet[jjnewStateCnt++] = 3; + break; + default : break; + } + } while(i != startsAt); + } + else if (curChar < 128) + { + long l = 1L << (curChar & 077); + do + { + switch(jjstateSet[--i]) + { + case 1: + if ((0x7fffffe87fffffeL & l) != 0L) + jjstateSet[jjnewStateCnt++] = 2; + break; + case 2: + if ((0x7fffffe87fffffeL & l) != 0L) + jjstateSet[jjnewStateCnt++] = 3; + break; + case 3: + if (curChar == 125) + kind = 31; + break; + case 4: + if (curChar == 123) + jjstateSet[jjnewStateCnt++] = 0; + break; + default : break; + } + } while(i != startsAt); + } + else + { + int i2 = (curChar & 0xff) >> 6; + long l2 = 1L << (curChar & 077); + do + { + switch(jjstateSet[--i]) + { + default : break; + } + } while(i != startsAt); + } + if (kind != 0x7fffffff) + { + jjmatchedKind = kind; + jjmatchedPos = curPos; + kind = 0x7fffffff; + } + ++curPos; + if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) + return curPos; + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { return curPos; } + } +} + +/** Token literal values. */ +public static final String[] jjstrLiteralImages = { +"", null, null, null, null, null, null, null, null, null, null, "\50", "\51", +"\76", "\74", "\54", "\72", "\45", null, null, null, null, null, null, null, null, +null, null, null, null, null, null, null, null, null, null, null, null, null, }; +protected Token jjFillToken() +{ + final Token t; + final String curTokenImage; + final int beginLine; + final int endLine; + final int beginColumn; + final int endColumn; + String im = jjstrLiteralImages[jjmatchedKind]; + curTokenImage = (im == null) ? input_stream.GetImage() : im; + beginLine = input_stream.getBeginLine(); + beginColumn = input_stream.getBeginColumn(); + endLine = input_stream.getEndLine(); + endColumn = input_stream.getEndColumn(); + t = Token.newToken(jjmatchedKind, curTokenImage); + + t.beginLine = beginLine; + t.endLine = endLine; + t.beginColumn = beginColumn; + t.endColumn = endColumn; + + return t; +} +static final int[] jjnextStates = { + 1, 2, 4, 28, 29, 33, 34, 38, 39, 43, 44, 48, 49, 53, 57, 55, + 56, 58, 62, 60, 61, 63, 67, 65, 66, 68, 72, 70, 71, 73, 77, 75, + 76, 28, 29, 33, 34, 38, 39, 43, 44, 48, 49, 53, 57, 58, 62, 63, + 67, 68, 72, 73, 77, 19, 20, 31, 32, 36, 37, 41, 42, 46, 47, 51, + 52, +}; + +int curLexState = 0; +int defaultLexState = 0; +int jjnewStateCnt; +int jjround; +int jjmatchedPos; +int jjmatchedKind; + +/** Get the next Token. */ +public Token getNextToken() +{ + Token specialToken = null; + Token matchedToken; + int curPos = 0; + + EOFLoop : + for (;;) + { + try + { + curChar = input_stream.BeginToken(); + } + catch(Exception e) + { + jjmatchedKind = 0; + jjmatchedPos = -1; + matchedToken = jjFillToken(); + matchedToken.specialToken = specialToken; + return matchedToken; + } + image = jjimage; + image.setLength(0); + jjimageLen = 0; + + for (;;) + { + switch(curLexState) + { + case 0: + jjmatchedKind = 0x7fffffff; + jjmatchedPos = 0; + curPos = jjMoveStringLiteralDfa0_0(); + break; + case 1: + jjmatchedKind = 0x7fffffff; + jjmatchedPos = 0; + curPos = jjMoveStringLiteralDfa0_1(); + if (jjmatchedPos == 0 && jjmatchedKind > 32) + { + jjmatchedKind = 32; + } + break; + } + if (jjmatchedKind != 0x7fffffff) + { + if (jjmatchedPos + 1 < curPos) + input_stream.backup(curPos - jjmatchedPos - 1); + if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) + { + matchedToken = jjFillToken(); + matchedToken.specialToken = specialToken; + if (jjnewLexState[jjmatchedKind] != -1) + curLexState = jjnewLexState[jjmatchedKind]; + return matchedToken; + } + else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) + { + if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) + { + matchedToken = jjFillToken(); + if (specialToken == null) + specialToken = matchedToken; + else + { + matchedToken.specialToken = specialToken; + specialToken = (specialToken.next = matchedToken); + } + SkipLexicalActions(matchedToken); + } + else + SkipLexicalActions(null); + if (jjnewLexState[jjmatchedKind] != -1) + curLexState = jjnewLexState[jjmatchedKind]; + continue EOFLoop; + } + jjimageLen += jjmatchedPos + 1; + if (jjnewLexState[jjmatchedKind] != -1) + curLexState = jjnewLexState[jjmatchedKind]; + curPos = 0; + jjmatchedKind = 0x7fffffff; + try { + curChar = input_stream.readChar(); + continue; + } + catch (java.io.IOException e1) { } + } + int error_line = input_stream.getEndLine(); + int error_column = input_stream.getEndColumn(); + String error_after = null; + boolean EOFSeen = false; + try { input_stream.readChar(); input_stream.backup(1); } + catch (java.io.IOException e1) { + EOFSeen = true; + error_after = curPos <= 1 ? "" : input_stream.GetImage(); + if (curChar == '\n' || curChar == '\r') { + error_line++; + error_column = 0; + } + else + error_column++; + } + if (!EOFSeen) { + input_stream.backup(1); + error_after = curPos <= 1 ? "" : input_stream.GetImage(); + } + throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); + } + } +} + +void SkipLexicalActions(Token matchedToken) +{ + switch(jjmatchedKind) + { + default : + break; + } +} +void MoreLexicalActions() +{ + jjimageLen += (lengthOfMatch = jjmatchedPos + 1); + switch(jjmatchedKind) + { + default : + break; + } +} +void TokenLexicalActions(Token matchedToken) +{ + switch(jjmatchedKind) + { + default : + break; + } +} +private void jjCheckNAdd(int state) +{ + if (jjrounds[state] != jjround) + { + jjstateSet[jjnewStateCnt++] = state; + jjrounds[state] = jjround; + } +} +private void jjAddStates(int start, int end) +{ + do { + jjstateSet[jjnewStateCnt++] = jjnextStates[start]; + } while (start++ != end); +} +private void jjCheckNAddTwoStates(int state1, int state2) +{ + jjCheckNAdd(state1); + jjCheckNAdd(state2); +} + +private void jjCheckNAddStates(int start, int end) +{ + do { + jjCheckNAdd(jjnextStates[start]); + } while (start++ != end); +} + + /** Constructor. */ + public UnlParserTokenManager(SimpleCharStream stream){ + + if (SimpleCharStream.staticFlag) + throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); + + input_stream = stream; + } + + /** Constructor. */ + public UnlParserTokenManager (SimpleCharStream stream, int lexState){ + ReInit(stream); + SwitchTo(lexState); + } + + /** Reinitialise parser. */ + + public void ReInit(SimpleCharStream stream) + { + + + jjmatchedPos = + jjnewStateCnt = + 0; + curLexState = defaultLexState; + input_stream = stream; + ReInitRounds(); + } + + private void ReInitRounds() + { + int i; + jjround = 0x80000001; + for (i = 78; i-- > 0;) + jjrounds[i] = 0x80000000; + } + + /** Reinitialise parser. */ + public void ReInit(SimpleCharStream stream, int lexState) + + { + ReInit(stream); + SwitchTo(lexState); + } + + /** Switch to specified lex state. */ + public void SwitchTo(int lexState) + { + if (lexState >= 2 || lexState < 0) + throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); + else + curLexState = lexState; + } + + +/** Lexer state names. */ +public static final String[] lexStateNames = { + "DEFAULT", + "WithinNLText", +}; + +/** Lex State array. */ +public static final int[] jjnewLexState = { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 1, 1, 0, 0, -1, -1, -1, -1, -1, -1, -1, +}; +static final long[] jjtoToken = { + 0x780ffff801L, +}; +static final long[] jjtoSkip = { + 0x6c00007c0L, +}; +static final long[] jjtoSpecial = { + 0x6c0000000L, +}; +static final long[] jjtoMore = { + 0x130000000L, +}; + protected SimpleCharStream input_stream; + + private final int[] jjrounds = new int[78]; + private final int[] jjstateSet = new int[2 * 78]; + private final StringBuilder jjimage = new StringBuilder(); + private StringBuilder image = jjimage; + private int jjimageLen; + private int lengthOfMatch; + protected int curChar; +} diff --git a/unl-parser/src/main/java/unl/print/dotFile/DotFileBuilder.java b/unl-parser/src/main/java/unl/print/dotFile/DotFileBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..6fa46e2a6875cff439ac6320c39fafbc5423ea04 --- /dev/null +++ b/unl-parser/src/main/java/unl/print/dotFile/DotFileBuilder.java @@ -0,0 +1,190 @@ +package unl.print.dotFile; + +import unl.*; + +import java.io.IOException; +import java.io.Writer; +import java.util.SortedSet; +import java.util.TreeSet; + +public class DotFileBuilder implements GraphExporter { + private final Writer writer; + + /** + * dot file writer + * + * @param writer the writer + * @throws IllegalArgumentException the writer is null + */ + public DotFileBuilder(Writer writer) { + if (null == writer) throw new IllegalArgumentException("The writer is null"); + this.writer = writer; + } + + + public void Write(Graph g) throws IOException { + try { + this.InternalWrite(g); + } catch (NoEntryNodeException e) { + // TODO : to define what to do here + } + } + + /** + * Export the current graph to Dot file. + * + * @param g The graph to export + * @throws IOException An I/O error occured + * @throws NoEntryNodeException Inconsistent nodes reference inside the graph + * @see IOException + */ + private void InternalWrite(Graph g) throws IOException, NoEntryNodeException { + writer.append("digraph G {\n") + .append("graph [fontname=\"courier\", compound=\"true\"];\n"); + + for (GraphNode node : g.getNodes()) { + if (node instanceof UniversalWordNode) { + Write((UniversalWordNode) node); + } + } + + // get all scopes in the graph + for (String scopeName : getScopesByName(g)) { + WriteCluster(scopeName, g); + } + + for (GraphRelation graphRelation : g.getRelations()) { + if (graphRelation.getSubGraphReferenceLabel().equals("")) { + Write(graphRelation, g); + } + } + + writer.append("}\n"); + } + + /** + * Write in a subgraph a scope + * + * @param scope The current scope name + * @param g The graph to export + * @throws IOException An I/O error occurred + * @throws NoEntryNodeException Inconsistent nodes reference inside the graph + * @see IOException + */ + private void WriteCluster(String scope, Graph g) throws IOException, NoEntryNodeException { + writer.append(String.format("subgraph cluster_%s{\n", scope.substring(1))) + .append(" color = black;\n") + .append(String.format(" label = \"%s\"", scope)); + + for (GraphRelation graphRelation : g.getRelations()) { + if (graphRelation.getSubGraphReferenceLabel().equals(scope)) { + Write(graphRelation, g); + } + } + + writer.append("}\n"); + } + + + /** + * Get all scopes by the name in g + * + * @param g the graph to export + * @return an ordered set of scope name + */ + private SortedSet<String> getScopesByName(Graph g) { + TreeSet<String> scopes = new TreeSet<>(); + for (GraphRelation graphRelation : + g.getRelations()) { + scopes.add(graphRelation.getSubGraphReferenceLabel()); + } + scopes.remove(""); + return scopes; + } + + /** + * Serialize into writer the universal node + * + * @param universalWordNode A universal node + * @throws IOException An I/O error occurred + * @see IOException + */ + private void Write(UniversalWordNode universalWordNode) throws IOException { + writer.append(String.valueOf(universalWordNode.getNodeNumber())) + .append(String.format(" [\nlabel=\"%s\\n", universalWordNode.getNodeId())); + + for (Object elem : universalWordNode.getAttributes()) { + writer.append(elem.toString()); + } + + writer.append("\"\n") + .append("shape=\"box\"\n"); + + if (universalWordNode.isEntryNode()) { + writer.append("fontname=\"courb\"\n"); + } + writer.append("];\n"); + } + + /** + * Write in the writer an arrow between to graphnode in inside g from graphRelation + * + * @param graphRelation A GraphRelation inside graph g + * @param g The current graphe to export + * @throws NoEntryNodeException One node in graphRelation is not found in g + * @throws IOException An I/O error occurred + * @see IOException + */ + private void Write(GraphRelation graphRelation, Graph g) throws NoEntryNodeException, IOException { + GraphNode n1 = graphRelation.getNode1(); + GraphNode n2 = graphRelation.getNode2(); + + if (n1.getNodeNumber() != 0 && n2.getNodeNumber() != 0) { + writer.append(getTextForSubGraphRelationOrGetNodeNumber(n1, g)) + .append(" -> ") + .append(getTextForSubGraphRelationOrGetNodeNumber(n2, g)); + + writer.append(String.format(" [label=\"%s\" ", graphRelation.getRelationLabel())) + // move the arrow tail to subgraph if nĂ©cessary (case of SubGraphReferenceNode) + .append(getFormattedTextIfIsSubGraphReferenceNodeOrEmpty(" ltail=\"cluster_%s\"", n1)) + // move the arrow head to subgraph if nĂ©cessary (case of SubGraphReferenceNode) + .append(getFormattedTextIfIsSubGraphReferenceNodeOrEmpty(" lhead=\"cluster_%s\"", n2)) + .append("];\n"); + } + } + + /** + * Get the corresponding node number for the GraphNode graphNode. + * + * @param graphNode the current graphNode to process + * @param g the global graph + * @return if graphNode is SubGraphRelationNode the node number of the referenced node in g, + * otherwise the node number of the current node in graphNode + * @throws NoEntryNodeException No corresponding node found in g for the corresponding inside graphNode + */ + private String getTextForSubGraphRelationOrGetNodeNumber(GraphNode graphNode, Graph g) throws NoEntryNodeException { + if (graphNode instanceof SubGraphReferenceNode) { + return Integer.toString(g.getEntryNode(((SubGraphReferenceNode) graphNode).getReferenceNumber()).getNodeNumber()); + } else { + return Integer.toString(graphNode.getNodeNumber()); + } + } + + /** + * get formatted text in format string suffixed by the graphnode reference number if the graphnode is a + * SubGraphReferenceNode or empty + * + * @param format the formatted text + * @param graphNode the currente graphnode + * @return if graphnode is a SubGraphReferenceNode return format string with graphnode reference number, + * otherwise empty + */ + private String getFormattedTextIfIsSubGraphReferenceNodeOrEmpty(String format, GraphNode graphNode) { + if (!(graphNode instanceof SubGraphReferenceNode)) { + return ""; + } + + // get substring(1) to remove leading colon on the reference number. + return String.format(format, ((SubGraphReferenceNode) graphNode).getReferenceNumber().substring(1)); + } +} diff --git a/unl-parser/src/test/java/unl/AllSetenceWithExpectedDotChecker.java b/unl-parser/src/test/java/unl/AllSetenceWithExpectedDotChecker.java new file mode 100644 index 0000000000000000000000000000000000000000..c8d7645836858a448c424c2bb2f96025148bb2b3 --- /dev/null +++ b/unl-parser/src/test/java/unl/AllSetenceWithExpectedDotChecker.java @@ -0,0 +1,177 @@ +package unl; + +public class AllSetenceWithExpectedDotChecker extends SentenceWithExpectedDotChecker { + private static final String ALL = "[D]" + + "[S:R1]\n" + + "{org:en}\n" + + "The system allows a radio channel to take on two states: Listening and Traffic.\n" + + "{/org}\n" + + "{unl}\n" + + "aoj( allow(icl>be, aoj>thing, ben>thing, obj>uw, equ>make_possible).@entry, system(icl>group).@def )\n" + + "obj( allow(icl>be, aoj>thing, ben>thing, obj>uw, equ>make_possible).@entry, take_on(aoj>thing, equ>assume,icl>change, obj>thing) )\n" + + "ben( allow(icl>be, aoj>thing, ben>thing, obj>uw, equ>make_possible).@entry, channel(icl>radiowave).@indef)\n" + + "aoj( take_on(aoj>thing, equ>assume, icl>change, obj>thing), channel(icl>radiowave).@indef) \n" + + "obj( take_on(aoj>thing, equ>assume, icl>change, obj>thing), state(icl>attribute).@plu ) \n" + + "qua( state(icl>attribute).@plu, 2 ) \n" + + "cnt( state(icl>attribute).@plu, listening(icl>sensing) )\n" + + "and( listening(icl>sensing),traffic(icl>communication) )\n" + + "{/unl}\n" + + "[/S]\n" + + "[S:R2]\n" + + "{org:en}\n" + + "The system displays a channel in green when it is in broadcast state. \n" + + "{/org}\n" + + "{unl}\n" + + "agt(display(icl>show,equ>exhibit,agt>thing,obj>thing).@entry.@present,system(icl>group).@def)\n" + + "mod(channel(icl>radiowave).@indef,green(icl>adj,iof>color))\n" + + "obj(display(icl>show,equ>exhibit,agt>thing,obj>thing).@entry.@present,channel(icl>radiowave).@indef)\n" + + "tim(display(icl>show,equ>exhibit,agt>thing,obj>thing).@entry.@present,when(icl>how,com>always,tim<uw,obj>uw))\n" + + "aoj:01(be_in_a_state(aoj>thing,icl>be,obj>state).@entry.@present,channel(icl>radiowave).@indef)\n" + + "plc:01(state(icl>attribute),broadcast(icl>message))\n" + + "obj:01(be_in_a_state(aoj>thing,icl>be,obj>state).@entry.@present,state(icl>attribute))\n" + + "obj(when(icl>how,com>always,tim<uw,obj>uw),:01)\n" + + "{/unl}\n" + + "[/S] \n" + + "[S:00]\n" + + "{org:en}\n" + + "The black cat and the white cat are eating.\n" + + "{/org}\n" + + "{unl}\n" + + "mod:01(cat1(icl>feline>thing).@entry.@def,black(icl>adj))\n" + + "and:01(cat1(icl>feline>thing).@entry.@def,cat2(icl>feline>thing).@entry.@def)\n" + + "mod:01(cat2(icl>feline>thing).@entry.@def,white(icl>adj))\n" + + "agt(eat(icl>consume>do,agt>living_thing,obj>concrete_thing,ins>thing).@entry.@pl.@present.@progress,:01.@_hn-scope)\n" + + "{/unl}\n" + + "[/S]\n" + + "[/D]"; + + private static final String ALL_DOT = "digraph G {\n" + + "graph [fontname=\"courier\", compound=\"true\"];\n" + + "1 [\n" + + "label=\"allow(aoj>thing,ben>thing,equ>make_possible,icl>be,obj>uw)\\n.@entry\"\n" + + "shape=\"box\"\n" + + "fontname=\"courb\"\n" + + "];\n" + + "2 [\n" + + "label=\"system(icl>group)\\n.@def\"\n" + + "shape=\"box\"\n" + + "];\n" + + "3 [\n" + + "label=\"take_on(aoj>thing,equ>assume,icl>change,obj>thing)\\n\"\n" + + "shape=\"box\"\n" + + "];\n" + + "4 [\n" + + "label=\"channel(icl>radiowave)\\n.@indef\"\n" + + "shape=\"box\"\n" + + "];\n" + + "5 [\n" + + "label=\"state(icl>attribute)\\n.@plu\"\n" + + "shape=\"box\"\n" + + "];\n" + + "6 [\n" + + "label=\"2\\n\"\n" + + "shape=\"box\"\n" + + "];\n" + + "7 [\n" + + "label=\"listening(icl>sensing)\\n\"\n" + + "shape=\"box\"\n" + + "];\n" + + "8 [\n" + + "label=\"traffic(icl>communication)\\n\"\n" + + "shape=\"box\"\n" + + "];\n" + + "1 -> 2 [label=\"aoj\" ];\n" + + "1 -> 3 [label=\"obj\" ];\n" + + "1 -> 4 [label=\"ben\" ];\n" + + "3 -> 4 [label=\"aoj\" ];\n" + + "3 -> 5 [label=\"obj\" ];\n" + + "5 -> 6 [label=\"qua\" ];\n" + + "5 -> 7 [label=\"cnt\" ];\n" + + "7 -> 8 [label=\"and\" ];\n" + + "}\n" + + "digraph G {\n" + + "graph [fontname=\"courier\", compound=\"true\"];\n" + + "1 [\n" + + "label=\"display(agt>thing,equ>exhibit,icl>show,obj>thing)\\n.@entry.@present\"\n" + + "shape=\"box\"\n" + + "fontname=\"courb\"\n" + + "];\n" + + "2 [\n" + + "label=\"system(icl>group)\\n.@def\"\n" + + "shape=\"box\"\n" + + "];\n" + + "3 [\n" + + "label=\"channel(icl>radiowave)\\n.@indef\"\n" + + "shape=\"box\"\n" + + "];\n" + + "4 [\n" + + "label=\"green(icl>adj,iof>color)\\n\"\n" + + "shape=\"box\"\n" + + "];\n" + + "5 [\n" + + "label=\"when(com>always,icl>how,obj>uw,tim<uw)\\n\"\n" + + "shape=\"box\"\n" + + "];\n" + + "6 [\n" + + "label=\"be_in_a_state(aoj>thing,icl>be,obj>state)\\n.@entry.@present\"\n" + + "shape=\"box\"\n" + + "fontname=\"courb\"\n" + + "];\n" + + "7 [\n" + + "label=\"state(icl>attribute)\\n\"\n" + + "shape=\"box\"\n" + + "];\n" + + "8 [\n" + + "label=\"broadcast(icl>message)\\n\"\n" + + "shape=\"box\"\n" + + "];\n" + + "subgraph cluster_01{\n" + + " color = black;\n" + + " label = \":01\"6 -> 3 [label=\"aoj\" ];\n" + + "7 -> 8 [label=\"plc\" ];\n" + + "6 -> 7 [label=\"obj\" ];\n" + + "}\n" + + "1 -> 2 [label=\"agt\" ];\n" + + "3 -> 4 [label=\"mod\" ];\n" + + "1 -> 3 [label=\"obj\" ];\n" + + "1 -> 5 [label=\"tim\" ];\n" + + "5 -> 6 [label=\"obj\" lhead=\"cluster_01\"];\n" + + "}\n" + + "digraph G {\n" + + "graph [fontname=\"courier\", compound=\"true\"];\n" + + "1 [\n" + + "label=\"cat1(icl>feline(icl>thing))\\n.@def.@entry\"\n" + + "shape=\"box\"\n" + + "fontname=\"courb\"\n" + + "];\n" + + "2 [\n" + + "label=\"black(icl>adj)\\n\"\n" + + "shape=\"box\"\n" + + "];\n" + + "3 [\n" + + "label=\"cat2(icl>feline(icl>thing))\\n.@def.@entry\"\n" + + "shape=\"box\"\n" + + "fontname=\"courb\"\n" + + "];\n" + + "4 [\n" + + "label=\"white(icl>adj)\\n\"\n" + + "shape=\"box\"\n" + + "];\n" + + "5 [\n" + + "label=\"eat(agt>living_thing,icl>consume(icl>do),ins>thing,obj>concrete_thing)\\n.@entry.@pl.@present.@progress\"\n" + + "shape=\"box\"\n" + + "fontname=\"courb\"\n" + + "];\n" + + "subgraph cluster_01{\n" + + " color = black;\n" + + " label = \":01\"1 -> 2 [label=\"mod\" ];\n" + + "1 -> 3 [label=\"and\" ];\n" + + "3 -> 4 [label=\"mod\" ];\n" + + "}\n" + + "5 -> 1 [label=\"agt\" lhead=\"cluster_01\"];\n" + + "}\n"; + + public AllSetenceWithExpectedDotChecker() { + super(ALL,ALL_DOT); + } +} diff --git a/unl-parser/src/test/java/unl/CatSentenceWithExpectedDotChecker.java b/unl-parser/src/test/java/unl/CatSentenceWithExpectedDotChecker.java new file mode 100644 index 0000000000000000000000000000000000000000..aa5ea7f8ed3d52087db6dc607ef3232d6bdcb414 --- /dev/null +++ b/unl-parser/src/test/java/unl/CatSentenceWithExpectedDotChecker.java @@ -0,0 +1,56 @@ +package unl; + +public class CatSentenceWithExpectedDotChecker extends SentenceWithExpectedDotChecker { + + private static final String CAT_UNL = "[D]" + + "[S:00]\n" + + "{org:en}\n" + + "The black cat and the white cat are eating.\n" + + "{/org}\n" + + "{unl}\n" + + "mod:01(cat1(icl>feline>thing).@entry.@def,black(icl>adj))\n" + + "and:01(cat1(icl>feline>thing).@entry.@def,cat2(icl>feline>thing).@entry.@def)\n" + + "mod:01(cat2(icl>feline>thing).@entry.@def,white(icl>adj))\n" + + "agt(eat(icl>consume>do,agt>living_thing,obj>concrete_thing,ins>thing).@entry.@pl.@present.@progress,:01.@_hn-scope)\n" + + "{/unl}\n" + + "[/S]\n" + + "[/D]"; + + private static final String CAT_DOT = "digraph G {\n" + + "graph [fontname=\"courier\", compound=\"true\"];\n" + + "1 [\n" + + "label=\"cat1(icl>feline(icl>thing))\\n.@def.@entry\"\n" + + "shape=\"box\"\n" + + "fontname=\"courb\"\n" + + "];\n" + + "2 [\n" + + "label=\"black(icl>adj)\\n\"\n" + + "shape=\"box\"\n" + + "];\n" + + "3 [\n" + + "label=\"cat2(icl>feline(icl>thing))\\n.@def.@entry\"\n" + + "shape=\"box\"\n" + + "fontname=\"courb\"\n" + + "];\n" + + "4 [\n" + + "label=\"white(icl>adj)\\n\"\n" + + "shape=\"box\"\n" + + "];\n" + + "5 [\n" + + "label=\"eat(agt>living_thing,icl>consume(icl>do),ins>thing,obj>concrete_thing)\\n.@entry.@pl.@present.@progress\"\n" + + "shape=\"box\"\n" + + "fontname=\"courb\"\n" + + "];\n" + + "subgraph cluster_01{\n" + + " color = black;\n" + + " label = \":01\"1 -> 2 [label=\"mod\" ];\n" + + "1 -> 3 [label=\"and\" ];\n" + + "3 -> 4 [label=\"mod\" ];\n" + + "}\n" + + "5 -> 1 [label=\"agt\" lhead=\"cluster_01\"];\n" + + "}\n"; + + public CatSentenceWithExpectedDotChecker() { + super(CAT_UNL, CAT_DOT); + } +} diff --git a/unl-parser/src/test/java/unl/EqualsBuilderTest.java b/unl-parser/src/test/java/unl/EqualsBuilderTest.java new file mode 100644 index 0000000000000000000000000000000000000000..4dd624009d2b797394f45d81f493b5131a8fbf59 --- /dev/null +++ b/unl-parser/src/test/java/unl/EqualsBuilderTest.java @@ -0,0 +1,27 @@ +package unl; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +class EqualsBuilderTest { + + @Test + void isEqual() { + String s1 = "qdfsf"; + int i1 = 1; + long l1 = 2L; + EqualsBuilder builder = new EqualsBuilder() + .append(s1) + .append(i1) + .append(l1); + + EqualsBuilder builder2 = new EqualsBuilder() + .append(s1) + .append(i1) + .append(l1); + + Assertions.assertTrue(() -> builder.isEqual(builder2)); + } +} \ No newline at end of file diff --git a/unl-parser/src/test/java/unl/R1SentenceWithExpectedDotChecker.java b/unl-parser/src/test/java/unl/R1SentenceWithExpectedDotChecker.java new file mode 100644 index 0000000000000000000000000000000000000000..b353e9ff01ded87885fb88d6adb755df9d543a5f --- /dev/null +++ b/unl-parser/src/test/java/unl/R1SentenceWithExpectedDotChecker.java @@ -0,0 +1,70 @@ +package unl; + +public class R1SentenceWithExpectedDotChecker extends SentenceWithExpectedDotChecker { + private static final String R1_UNL = "[D]\n" + + "[S:R1]\n" + + "{org:en}\n" + + "The system allows a radio channel to take on two states: Listening and Traffic.\n" + + "{/org}\n" + + "{unl}\n" + + "aoj( allow(icl>be, aoj>thing, ben>thing, obj>uw, equ>make_possible).@entry, system(icl>group).@def )\n" + + "obj( allow(icl>be, aoj>thing, ben>thing, obj>uw, equ>make_possible).@entry, take_on(aoj>thing, equ>assume,icl>change, obj>thing) )\n" + + "ben( allow(icl>be, aoj>thing, ben>thing, obj>uw, equ>make_possible).@entry, channel(icl>radiowave).@indef)\n" + + "aoj( take_on(aoj>thing, equ>assume, icl>change, obj>thing), channel(icl>radiowave).@indef ) \n" + + "obj( take_on(aoj>thing, equ>assume, icl>change, obj>thing), state(icl>attribute).@plu ) \n" + + "qua( state(icl>attribute).@plu, 2 ) \n" + + "cnt( state(icl>attribute).@plu, listening(icl>sensing) )\n" + + "and( listening(icl>sensing),traffic(icl>communication) )\n" + + "{/unl}\n" + + "[/S]\n" + + "[/D]"; + + private static final String R1_DOT = "digraph G {\n" + + "graph [fontname=\"courier\", compound=\"true\"];\n" + + "1 [\n" + + "label=\"allow(aoj>thing,ben>thing,equ>make_possible,icl>be,obj>uw)\\n.@entry\"\n" + + "shape=\"box\"\n" + + "fontname=\"courb\"\n" + + "];\n" + + "2 [\n" + + "label=\"system(icl>group)\\n.@def\"\n" + + "shape=\"box\"\n" + + "];\n" + + "3 [\n" + + "label=\"take_on(aoj>thing,equ>assume,icl>change,obj>thing)\\n\"\n" + + "shape=\"box\"\n" + + "];\n" + + "4 [\n" + + "label=\"channel(icl>radiowave)\\n.@indef\"\n" + + "shape=\"box\"\n" + + "];\n" + + "5 [\n" + + "label=\"state(icl>attribute)\\n.@plu\"\n" + + "shape=\"box\"\n" + + "];\n" + + "6 [\n" + + "label=\"2\\n\"\n" + + "shape=\"box\"\n" + + "];\n" + + "7 [\n" + + "label=\"listening(icl>sensing)\\n\"\n" + + "shape=\"box\"\n" + + "];\n" + + "8 [\n" + + "label=\"traffic(icl>communication)\\n\"\n" + + "shape=\"box\"\n" + + "];\n" + + "1 -> 2 [label=\"aoj\" ];\n" + + "1 -> 3 [label=\"obj\" ];\n" + + "1 -> 4 [label=\"ben\" ];\n" + + "3 -> 4 [label=\"aoj\" ];\n" + + "3 -> 5 [label=\"obj\" ];\n" + + "5 -> 6 [label=\"qua\" ];\n" + + "5 -> 7 [label=\"cnt\" ];\n" + + "7 -> 8 [label=\"and\" ];\n" + + "}\n"; + + public R1SentenceWithExpectedDotChecker() { + super(R1_UNL, R1_DOT); + } +} diff --git a/unl-parser/src/test/java/unl/R2SentenceWithExpectedDotChecker.java b/unl-parser/src/test/java/unl/R2SentenceWithExpectedDotChecker.java new file mode 100644 index 0000000000000000000000000000000000000000..6a53a5068042e86c94db50d4c2a6493c3b9f380a --- /dev/null +++ b/unl-parser/src/test/java/unl/R2SentenceWithExpectedDotChecker.java @@ -0,0 +1,74 @@ +package unl; + +public class R2SentenceWithExpectedDotChecker extends SentenceWithExpectedDotChecker { + private static final String R2_UNL = "[D]\n" + + "[S:R2]\n" + + "{org:en}\n" + + "The system displays a channel in green when it is in broadcast state. \n" + + "{/org}\n" + + "{unl}\n" + + "agt(display(icl>show,equ>exhibit,agt>thing,obj>thing).@entry.@present,system(icl>group).@def)\n" + + "mod(channel(icl>radiowave).@indef,green(icl>adj,iof>color))\n" + + "obj(display(icl>show,equ>exhibit,agt>thing,obj>thing).@entry.@present,channel(icl>radiowave).@indef)\n" + + "tim(display(icl>show,equ>exhibit,agt>thing,obj>thing).@entry.@present,when(icl>how,com>always,tim<uw,obj>uw))\n" + + "aoj:01(be_in_a_state(aoj>thing,icl>be,obj>state).@entry.@present,channel(icl>radiowave).@indef)\n" + + "plc:01(state(icl>attribute),broadcast(icl>message))\n" + + "obj:01(be_in_a_state(aoj>thing,icl>be,obj>state).@entry.@present,state(icl>attribute))\n" + + "obj(when(icl>how,com>always,tim<uw,obj>uw),:01)\n" + + "{/unl}\n" + + "[/S] \n" + + "[/D] \n"; + + private static final String R2_DOT = "digraph G {\n" + + "graph [fontname=\"courier\", compound=\"true\"];\n" + + "1 [\n" + + "label=\"display(agt>thing,equ>exhibit,icl>show,obj>thing)\\n.@entry.@present\"\n" + + "shape=\"box\"\n" + + "fontname=\"courb\"\n" + + "];\n" + + "2 [\n" + + "label=\"system(icl>group)\\n.@def\"\n" + + "shape=\"box\"\n" + + "];\n" + + "3 [\n" + + "label=\"channel(icl>radiowave)\\n.@indef\"\n" + + "shape=\"box\"\n" + + "];\n" + + "4 [\n" + + "label=\"green(icl>adj,iof>color)\\n\"\n" + + "shape=\"box\"\n" + + "];\n" + + "5 [\n" + + "label=\"when(com>always,icl>how,obj>uw,tim<uw)\\n\"\n" + + "shape=\"box\"\n" + + "];\n" + + "6 [\n" + + "label=\"be_in_a_state(aoj>thing,icl>be,obj>state)\\n.@entry.@present\"\n" + + "shape=\"box\"\n" + + "fontname=\"courb\"\n" + + "];\n" + + "7 [\n" + + "label=\"state(icl>attribute)\\n\"\n" + + "shape=\"box\"\n" + + "];\n" + + "8 [\n" + + "label=\"broadcast(icl>message)\\n\"\n" + + "shape=\"box\"\n" + + "];\n" + + "subgraph cluster_01{\n" + + " color = black;\n" + + " label = \":01\"6 -> 3 [label=\"aoj\" ];\n" + + "7 -> 8 [label=\"plc\" ];\n" + + "6 -> 7 [label=\"obj\" ];\n" + + "}\n" + + "1 -> 2 [label=\"agt\" ];\n" + + "3 -> 4 [label=\"mod\" ];\n" + + "1 -> 3 [label=\"obj\" ];\n" + + "1 -> 5 [label=\"tim\" ];\n" + + "5 -> 6 [label=\"obj\" lhead=\"cluster_01\"];\n" + + "}\n"; + + public R2SentenceWithExpectedDotChecker() { + super(R2_UNL, R2_DOT); + } +} diff --git a/unl-parser/src/test/java/unl/SentenceWithExpectedDotArgumentProvider.java b/unl-parser/src/test/java/unl/SentenceWithExpectedDotArgumentProvider.java new file mode 100644 index 0000000000000000000000000000000000000000..7eb6b298ff6029fbcb13028d249185fefe7ccf74 --- /dev/null +++ b/unl-parser/src/test/java/unl/SentenceWithExpectedDotArgumentProvider.java @@ -0,0 +1,17 @@ +package unl; + +import org.junit.jupiter.api.extension.ExtensionContext; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.ArgumentsProvider; + +import java.util.stream.Stream; + +public class SentenceWithExpectedDotArgumentProvider implements ArgumentsProvider { + @Override + public Stream<? extends Arguments> provideArguments(ExtensionContext extensionContext) throws Exception { + return Stream.of(Arguments.of(new R1SentenceWithExpectedDotChecker()), + Arguments.of(new R2SentenceWithExpectedDotChecker()), + Arguments.of(new CatSentenceWithExpectedDotChecker()), + Arguments.of(new AllSetenceWithExpectedDotChecker())); + } +} diff --git a/unl-parser/src/test/java/unl/SentenceWithExpectedDotChecker.java b/unl-parser/src/test/java/unl/SentenceWithExpectedDotChecker.java new file mode 100644 index 0000000000000000000000000000000000000000..352db595ef01847023cb91f6ae65c595b838cf78 --- /dev/null +++ b/unl-parser/src/test/java/unl/SentenceWithExpectedDotChecker.java @@ -0,0 +1,43 @@ +package unl; + +public abstract class SentenceWithExpectedDotChecker { + private String unlSentence; + private String expectedDotContent; + private String currentDotContent; + + public String getUnlSentence() { + return this.unlSentence; + } + + protected void setUnlSentence(String unlSentence) { + this.unlSentence = null == unlSentence ? "" : unlSentence; + } + + public String getExpectedDotContent() { + return this.expectedDotContent; + } + + public void setExpectedDotContent(String expectedDotContent) { + this.expectedDotContent = expectedDotContent; + } + + public String getCurrentDotContent() { + return currentDotContent; + } + + public void setCurrentDotContent(String currentDotContent) { + this.currentDotContent = null == currentDotContent ? "" : currentDotContent; + } + + public boolean checkDotContentIsEqual(){ + return this.expectedDotContent.equals(this.currentDotContent); + } + + public SentenceWithExpectedDotChecker(String unlSentence, String expectedDotContent) { + if ((null == unlSentence) || (null == expectedDotContent)) { + throw new IllegalArgumentException(); + } + this.unlSentence = unlSentence; + this.expectedDotContent = expectedDotContent; + } +} diff --git a/unl-parser/src/test/java/unl/parser/UnlParserFactory.java b/unl-parser/src/test/java/unl/parser/UnlParserFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..76833685d17fedb58fc622950aea5eb4c93377fb --- /dev/null +++ b/unl-parser/src/test/java/unl/parser/UnlParserFactory.java @@ -0,0 +1,5 @@ +package unl.parser; + +public interface UnlParserFactory { + WrapperUnlParser create(); +} diff --git a/unl-parser/src/test/java/unl/parser/UnlParserFactoryFromString.java b/unl-parser/src/test/java/unl/parser/UnlParserFactoryFromString.java new file mode 100644 index 0000000000000000000000000000000000000000..56d41a9eb2be708cfdbd347467a5bb74c0b4df83 --- /dev/null +++ b/unl-parser/src/test/java/unl/parser/UnlParserFactoryFromString.java @@ -0,0 +1,17 @@ +package unl.parser; + +import java.io.BufferedReader; +import java.io.StringReader; + +public class UnlParserFactoryFromString implements UnlParserFactory { + + private final String stringToParse; + + public UnlParserFactoryFromString(String stringToParse) { + this.stringToParse = stringToParse; + } + + public WrapperUnlParser create(){ + return new WrapperUnlParser(new BufferedReader(new StringReader(stringToParse))); + } +} diff --git a/unl-parser/src/test/java/unl/parser/UnlParserTest.java b/unl-parser/src/test/java/unl/parser/UnlParserTest.java new file mode 100644 index 0000000000000000000000000000000000000000..9fc8a781749ae31a4836ba7916c320fcc8525f6e --- /dev/null +++ b/unl-parser/src/test/java/unl/parser/UnlParserTest.java @@ -0,0 +1,50 @@ +package unl.parser; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ArgumentsSource; +import unl.SentenceWithExpectedDotArgumentProvider; +import unl.SentenceWithExpectedDotChecker; +import unl.UnlDocument; + +import java.util.concurrent.atomic.AtomicReference; + +class UnlParserTest { + + @ParameterizedTest + @ArgumentsSource(SentenceWithExpectedDotArgumentProvider.class) + void UnlParserShouldParseSimpleSentenceWithoutException(SentenceWithExpectedDotChecker input){ + UnlParserFactory unlFactory = new UnlParserFactoryFromString(input.getUnlSentence()); + createAndCheckUnlParserValidity(unlFactory); + } + + @ParameterizedTest + @ArgumentsSource(SentenceWithExpectedDotArgumentProvider.class) + void UnlDocumentsShouldBeSerializedToStringWithoutException(SentenceWithExpectedDotChecker input){ + UnlParserFactory unlFactory = new UnlParserFactoryFromString(input.getUnlSentence()); + WrapperUnlParser wrapper = createAndCheckUnlParserValidity(unlFactory); + + for(UnlDocument unlDocument : wrapper.getUnlDocumentList()){ + AtomicReference<String> stringOfUnlDocument = new AtomicReference<>(); + Assertions.assertDoesNotThrow(() -> stringOfUnlDocument.set(unlDocument.toString())); + } + } + + /** + * Check validity of parser: + * - It checks the creation of parser + * - It checks the content of document doesn't contain an error + * @param factory A factory of UnlParser + * @return An unlParserWrapper + */ + WrapperUnlParser createAndCheckUnlParserValidity(UnlParserFactory factory){ + AtomicReference<WrapperUnlParser> unlParser = new AtomicReference<>(); + + Assertions.assertDoesNotThrow(() -> unlParser.set(factory.create()), ""); + Assertions.assertNotNull(unlParser.get(), "The parse should exists"); + Assertions.assertFalse(unlParser.get().hasError(), String.format("Current error: '%s'", String.join(",", unlParser.get().getErrors()))); + + return unlParser.get(); + } + +} \ No newline at end of file diff --git a/unl-parser/src/test/java/unl/parser/WrapperUnlParser.java b/unl-parser/src/test/java/unl/parser/WrapperUnlParser.java new file mode 100644 index 0000000000000000000000000000000000000000..a3b6cd3a70eec9bc50ea03b377a35d9f8694abff --- /dev/null +++ b/unl-parser/src/test/java/unl/parser/WrapperUnlParser.java @@ -0,0 +1,80 @@ +package unl.parser; + +import unl.UnlDocument; +import java.util.Vector; + +public class WrapperUnlParser { + private Vector<UnlDocument> documents; + private ErrorCollection errors; + private final UnlParser parser; + + public WrapperUnlParser(java.io.Reader stream) { + this.parser = new UnlParser(stream); + this.documents = null; + this.errors = null; + } + + public Vector<UnlDocument> getUnlDocumentList() { + initializeIfNecessary(); + return this.documents; + } + + private void initializeIfNecessary(){ + if (null == this.documents) { + initialize(); + } + } + + private void initialize() { + this.errors = new ErrorCollection(false); + try { + this.documents = this.parser.createUnlDocumentList(); + for (UnlDocument document: this.documents) { + if(document.HasError()) { + this.errors.addError(document.getError()); + } + } + } catch (ParseException e) { + this.errors.addError(e.toString()); + return; + } + + fillErrors(); + } + + private void fillErrors() { + for (UnlDocument document : this.documents) { + if (document.HasError()) { + this.errors.addError(document.getError()); + } + } + } + + public boolean hasError(){ + initializeIfNecessary(); + return errors.hasError; + } + + public Vector<String> getErrors(){ + initializeIfNecessary(); + return errors.errors; + } + + private class ErrorCollection { + private final Vector<String> errors; + private boolean hasError; + + public ErrorCollection(boolean hasError) { + this.hasError = hasError; + errors = new Vector<>(); + } + + public void addError(String error){ + hasError = true; + if (!this.errors.contains(error)) + { + this.errors.add(error); + } + } + } +} diff --git a/unl-parser/src/test/java/unl/print/dotFile/DotFileBuilderTest.java b/unl-parser/src/test/java/unl/print/dotFile/DotFileBuilderTest.java new file mode 100644 index 0000000000000000000000000000000000000000..45de391f4f4282faa805308c58a79296f0472cf3 --- /dev/null +++ b/unl-parser/src/test/java/unl/print/dotFile/DotFileBuilderTest.java @@ -0,0 +1,83 @@ +package unl.print.dotFile; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestReporter; +import org.junit.jupiter.api.io.TempDir; +import unl.*; +import unl.parser.UnlParser; + +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Vector; +import java.util.concurrent.atomic.AtomicReference; + +class DotFileBuilderTest { + + @TempDir + static Path SharedTempDir; + + private TestReporter testReporter; + + @Test + public void dotFileBuilderShouldCreateDotFileR1WithoutException(TestReporter testReporter) { + this.testReporter = testReporter; + Path dotPAth = SharedTempDir.resolve("r1.dot"); + writeInFile(dotPAth, new R1SentenceWithExpectedDotChecker()); + } + + @Test + public void dotFileBuilderShouldCreateDotFileWithoutException(TestReporter testReporter) { + this.testReporter = testReporter; + Path dotPAth = SharedTempDir.resolve("r2.dot"); + this.writeInFile(dotPAth, new R2SentenceWithExpectedDotChecker()); + } + + @Test + public void dotFileBuilderShouldCreateDotFileCatWithoutException(TestReporter testReporter) { + this.testReporter = testReporter; + Path dotPAth = SharedTempDir.resolve("cat.dot"); + this.writeInFile(dotPAth, new CatSentenceWithExpectedDotChecker()); + } + + @Test + public void dotFileBuilderShouldCreateDotFileAllWithoutException(TestReporter testReporter) { + this.testReporter = testReporter; + Path dotPAth = SharedTempDir.resolve("all.dot"); + + this.writeInFile(dotPAth, new AllSetenceWithExpectedDotChecker()); + } + + private void writeInFile(Path filePath, SentenceWithExpectedDotChecker sentenceChecker) { + // Startup + UnlParser parser = new UnlParser(new BufferedReader(new StringReader(sentenceChecker.getUnlSentence()))); + AtomicReference<Vector<UnlDocument>> documentsAtomic = new AtomicReference<>(); + Assertions.assertDoesNotThrow(() -> documentsAtomic.set(parser.createUnlDocumentList())); + + AtomicReference<File> outFile = new AtomicReference<>(); + Assertions.assertDoesNotThrow(() -> outFile.set(new File(filePath.toAbsolutePath().toString()))); + + AtomicReference<BufferedWriter> outFileWriter = new AtomicReference<>(); + Assertions.assertDoesNotThrow(() -> outFileWriter.set(new BufferedWriter(new FileWriter(outFile.get(), false)))); + + DotFileBuilder dotFileBuilder = new DotFileBuilder(outFileWriter.get()); + + // Test + for (UnlDocument document : + documentsAtomic.get()) { + for(UnlDocumentNode documentNode : document.getDocElements()){ + Assertions.assertDoesNotThrow(() -> dotFileBuilder.Write(documentNode.getGraph())); + } + } + + // Teardown + Assertions.assertDoesNotThrow(() -> { outFileWriter.get().flush(); outFileWriter.get().close(); }); + Assertions.assertTrue(() -> outFile.get().length() != 0); + Assertions.assertDoesNotThrow(() -> sentenceChecker.setCurrentDotContent(Files.readString(filePath, StandardCharsets.UTF_8))); + Assertions.assertTrue(() -> sentenceChecker.checkDotContentIsEqual()); + + } +} \ No newline at end of file diff --git a/unl-parser/unl-parser.iml b/unl-parser/unl-parser.iml new file mode 100644 index 0000000000000000000000000000000000000000..7f41d813cfcf44270f577d9a8135613a17bd8c18 --- /dev/null +++ b/unl-parser/unl-parser.iml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11"> + <output url="file://$MODULE_DIR$/target/classes" /> + <output-test url="file://$MODULE_DIR$/target/test-classes" /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/target/generated-sources/annotations" isTestSource="false" generated="true" /> + <excludeFolder url="file://$MODULE_DIR$/target" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.7.0-M1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.7.0-M1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.7.0-M1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.7.0-M1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.7.0-M1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.7.0-M1" level="project" /> + </component> +</module> \ No newline at end of file diff --git a/unl2rdf-app/pom.xml b/unl2rdf-app/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..1879ff9de5350eb3aa976e292b97ee77f088c831 --- /dev/null +++ b/unl2rdf-app/pom.xml @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>unl2rdf</groupId> + <version>1.0-SNAPSHOT</version> + <artifactId>unl2rdf</artifactId> + </parent> + + <name>UNL to RDF converter</name> + <artifactId>unl2rdf-app</artifactId> + + <packaging>jar</packaging> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.8.1</version> + <configuration> + <source>11</source> + <target>11</target> + <annotationProcessorPaths> + <path> + <groupId>info.picocli</groupId> + <artifactId>picocli-codegen</artifactId> + <version>4.2.0</version> + </path> + </annotationProcessorPaths> + <compilerArgs> + <arg>-Aproject=${project.groupId}/${project.artifactId}</arg> + </compilerArgs> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>3.2.0</version> + <configuration> + <archive> + <manifest> + <addClasspath>true</addClasspath> + <mainClass>unl2rdf.Unl2Rdf</mainClass> + <classpathPrefix>lib/</classpathPrefix> + </manifest> + <manifestEntries> + <Class-Path>.</Class-Path> + </manifestEntries> + </archive> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>3.1.2</version> + <executions> + <execution> + <id>copy-dependencies</id> + <phase>package</phase> + <goals> + <goal>copy-dependencies</goal> + </goals> + <configuration> + <outputDirectory> + ${project.build.directory}/lib/ + </outputDirectory> + <overWriteIfNewer>true</overWriteIfNewer> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-assembly-plugin</artifactId> + <version>3.3.0</version> + <executions> + <execution> + <id>create-my-bundle</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + <configuration> + <descriptorRefs> + <descriptorRef>jar-with-dependencies</descriptorRef> + </descriptorRefs> + <archive> + <manifest> + <addClasspath>true</addClasspath> + <mainClass>unl2rdf.Unl2Rdf</mainClass> + </manifest> + </archive> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + + <dependencies> + <dependency> + <groupId>info.picocli</groupId> + <artifactId>picocli</artifactId> + <version>4.2.0</version> + </dependency> + <dependency> + <groupId>unl2rdf</groupId> + <artifactId>unl-parser</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + + +</project> diff --git a/unl2rdf-app/src/main/java/unl2rdf/Options.java b/unl2rdf-app/src/main/java/unl2rdf/Options.java new file mode 100644 index 0000000000000000000000000000000000000000..725c2f4d77e3d31b0f5d177eb79021c14cf4f0b9 --- /dev/null +++ b/unl2rdf-app/src/main/java/unl2rdf/Options.java @@ -0,0 +1,80 @@ +package unl2rdf; + +import picocli.CommandLine; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.InputStreamReader; +import java.nio.file.Paths; +import java.util.Optional; +import java.util.Vector; + +public class Options { + @CommandLine.Option(names = "--input-file", description = "Input file name (absolute or relative to current working directory)") + String inputFile; + + @CommandLine.Option(names = "--output-file", description = "The name of the output file (without extension)", required = true) + String outputFile; + + @CommandLine.Option(names = "--output-type", description = "Comma separated file type to output file (ie: dot,rdf)") + String outFileExtensions; + + @CommandLine.Option(names = "--output-Dir", description = "The output dir relative to the current working directory or absolute") + String outputDir; + + @CommandLine.Option(names = {"-v", "--verbose"}, description = "Verbose mode. Helpful for troubleshooting.") + private boolean[] verbosity; + + private Optional<Boolean> verbose; + + String getOutputFile() { + if (this.outputDir == null || this.outputDir.isBlank()) { + this.outputDir = "."; + } + return Paths.get(this.outputDir, this.outputFile).toAbsolutePath().toString(); + } + + Vector<OutFileType> getOutputFileType() { + String[] strings = this.outFileExtensions.split(","); + Vector<OutFileType> result = new Vector<>(); + + for (String string : + strings) { + if (string.equals("rdf")) { + result.add(OutFileType.rdf); + } else if (string.equals("dot")) { + result.add(OutFileType.dot); + } + } + + return result; + } + + public InputStreamReader getInputStream() throws FileNotFoundException { + if (null != this.inputFile) { + return new InputStreamReader(new FileInputStream(this.getInputFile())); + } + + return new InputStreamReader(System.in); + } + + public File getInputFile() { + return Paths.get(this.inputFile).toFile(); + } + + public boolean getVerbose() { + if (!verbose.isPresent()) { + var result = null != this.verbose + && this.verbosity.length > 0; + if (result != false) { + for (var verbosity : + this.verbosity) { + result = result || verbosity; + } + } + verbose = Optional.of(result); + } + return this.verbose.get(); + } +} diff --git a/unl2rdf-app/src/main/java/unl2rdf/OutFileType.java b/unl2rdf-app/src/main/java/unl2rdf/OutFileType.java new file mode 100644 index 0000000000000000000000000000000000000000..db66371bb2985b516525d261739fe4137050fe8d --- /dev/null +++ b/unl2rdf-app/src/main/java/unl2rdf/OutFileType.java @@ -0,0 +1,6 @@ +package unl2rdf; + +public enum OutFileType { + rdf, + dot +} diff --git a/unl2rdf-app/src/main/java/unl2rdf/Unl2Rdf.java b/unl2rdf-app/src/main/java/unl2rdf/Unl2Rdf.java new file mode 100644 index 0000000000000000000000000000000000000000..5be23903baf8447ef6eefcadc08a08a6f5100bb6 --- /dev/null +++ b/unl2rdf-app/src/main/java/unl2rdf/Unl2Rdf.java @@ -0,0 +1,80 @@ +package unl2rdf; + +import picocli.CommandLine; +import unl.GraphExporter; +import unl.UnlDocument; +import unl.UnlDocumentNode; +import unl.parser.ParseException; +import unl.parser.UnlParser; +import unl.print.dotFile.DotFileBuilder; + +import java.io.BufferedReader; +import java.io.FileWriter; +import java.io.IOException; +import java.util.Vector; + +public class Unl2Rdf { + public static void main(String[] args) throws ParseException, IOException { + + Options options = new Options(); + + try { + CommandLine.ParseResult parseResult = new CommandLine(options).parseArgs(args); + + if(!CommandLine.printHelpIfRequested(parseResult)){ + runProgram(options); + } + } catch (CommandLine.ParameterException e) { + System.err.println(e.getMessage()); + e.getCommandLine().usage(System.err); + } + + runProgram(options); + } + + private static void runProgram(Options options) throws ParseException, IOException { + System.out.println(String.format("Source file : '%s'", options.getInputFile().getAbsolutePath())); + BufferedReader bufferedReader = new BufferedReader(options.getInputStream()); + UnlParser parser = new UnlParser(bufferedReader); + Vector<UnlDocument> documents = parser.createUnlDocumentList(); + + for (OutFileType outType : options.getOutputFileType()) { + String extension = ToExtension(outType); + String outfileName = options.getOutputFile() + extension; + FileWriter fileWriter = new FileWriter(outfileName, false); + GraphExporter exporter = GetExporter(outType, fileWriter); + for (UnlDocument document : + documents) { + for (UnlDocumentNode unlNode : document.getDocElements()) { + System.out.println(String.format("Exporting graph : %s", unlNode.getGraph().toString())); + exporter.Write(unlNode.getGraph()); + } + } + fileWriter.close(); + System.out.println(String.format("Graph writen into file '%s'", outfileName)); + } + } + + + private static String ToExtension(OutFileType outFileType) { + switch (outFileType) { + case rdf: + return ".rdf"; + case dot: + return ".dot"; + } + throw new IllegalArgumentException(String.format("unknown fileType '%s", outFileType.toString())); + } + + private static GraphExporter GetExporter(OutFileType fileType, FileWriter writer) { + switch (fileType) { + case rdf: + throw new UnsupportedOperationException("Operation not implemented for rdf"); + case dot: + return new DotFileBuilder(writer); + } + throw new IllegalArgumentException(String.format("unknown fileType '%s", fileType.toString())); + } + +} + diff --git a/unl2rdf-app/src/main/resources/META-INF/MANIFEST.MF b/unl2rdf-app/src/main/resources/META-INF/MANIFEST.MF new file mode 100644 index 0000000000000000000000000000000000000000..a115e8f07a342ae1f6525af24a840028df38ae1f --- /dev/null +++ b/unl2rdf-app/src/main/resources/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: unl2rdf.Unl2Rdf +Build-Jdk-Spec: 11 diff --git a/unl2rdf-app/src/test/java/unl2rdf/Unl2RdfTest.java b/unl2rdf-app/src/test/java/unl2rdf/Unl2RdfTest.java new file mode 100644 index 0000000000000000000000000000000000000000..9b54fad04ae6c93d4b56b80c23e80d176ed42655 --- /dev/null +++ b/unl2rdf-app/src/test/java/unl2rdf/Unl2RdfTest.java @@ -0,0 +1,29 @@ +package unl2rdf; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Tag; +import org.junit.jupiter.api.extension.ExtensionContext; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.ArgumentsProvider; +import org.junit.jupiter.params.provider.ArgumentsSource; + +import java.util.stream.Stream; + +class Unl2RdfTest { + + @Tag("integration") + @ParameterizedTest(name = "{index} ==> Unl2Rdf.main({arguments})") + @ArgumentsSource(TestMainShouldNotThrowOnPartialParameterArgumentProvider.class) + public void TestMainShouldNotThrowOnPartialParameter(String[] args) { + Assertions.assertDoesNotThrow(() -> Unl2Rdf.main(args)); + } + + static class TestMainShouldNotThrowOnPartialParameterArgumentProvider implements ArgumentsProvider { + + @Override + public Stream<? extends Arguments> provideArguments(ExtensionContext extensionContext) { + return Stream.of(Arguments.of((Object) new String[]{"--input-file", "Examples/exemples_unl.txt", "--output-file", "foo", "--output-type", "dot"})); + } + } +} \ No newline at end of file diff --git a/unl2rdf-app/unl2rdf-app.iml b/unl2rdf-app/unl2rdf-app.iml new file mode 100644 index 0000000000000000000000000000000000000000..e92f84a1b4697125a1e7388b4665e60b9de6cb44 --- /dev/null +++ b/unl2rdf-app/unl2rdf-app.iml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11"> + <output url="file://$MODULE_DIR$/target/classes" /> + <output-test url="file://$MODULE_DIR$/target/test-classes" /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/target/generated-sources/annotations" isTestSource="false" generated="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> + <excludeFolder url="file://$MODULE_DIR$/target" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="library" name="Maven: info.picocli:picocli:4.2.0" level="project" /> + <orderEntry type="module" module-name="unl-parser" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.7.0-M1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.7.0-M1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.7.0-M1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.7.0-M1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.7.0-M1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.7.0-M1" level="project" /> + </component> +</module> \ No newline at end of file diff --git a/unl2rdf.iml b/unl2rdf.iml new file mode 100644 index 0000000000000000000000000000000000000000..a1228676ab4a0db53542223375c69006ea8969ba --- /dev/null +++ b/unl2rdf.iml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11"> + <output url="file://$MODULE_DIR$/target/classes" /> + <output-test url="file://$MODULE_DIR$/target/test-classes" /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/unl-parser/src/main/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/unl-parser/src/main/resources" type="java-resource" /> + <sourceFolder url="file://$MODULE_DIR$/unl-parser/src/test/java" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/target/generated-sources/annotations" isTestSource="false" generated="true" /> + <excludeFolder url="file://$MODULE_DIR$/target" /> + </content> + <orderEntry type="jdk" jdkName="11" jdkType="JavaSDK" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.7.0-M1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.7.0-M1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.7.0-M1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.7.0-M1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.7.0-M1" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.7.0-M1" level="project" /> + </component> +</module> \ No newline at end of file