package aminePlatform.samples.buildOntology; /******************************************************************* Amine - Artificial Intelligence platform for the development of Intelligent Systems. Copyright (C) 2004 AmineGroup. GNU Lesser General Public License This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 2.1 of the License. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *********************************************************************/ import java.util.*; import java.awt.event.*; import java.io.File; import aminePlatform.kernel.lexicons.*; import aminePlatform.kernel.ontology.*; import aminePlatform.util.cg.*; import aminePlatform.util.parserGenerator.*; import aminePlatform.guis.util.*; /** *
Title : BuildKMOntology Sample class
*Description : This class builds an ontology that is an adaptation of a subset of an ontology * provided by the Knowledge Machine group (www.cs.utexas.edu/users/mfkb/RKF/km.html). *
A first version was developed by Elalami Sanae and Chiadmi Fadwa (December 2003), the * current version is a refinment of the first version, made by Karim Buzoubaa
* @author Elalami Sanae and Chiadmi Fadwa, and reviewed/refined by Karim Bouzoubaa * @version 2 */ public class BuildKMOntology { public BuildKMOntology() { Identifier.setIgnoreCase(false); CG.setFunctionalCG(false); Identifier mainLanguage = new Identifier("English"); Identifier rootIdentifier = new Identifier("Universal"); Identifier rootRelIdentifier = new Identifier("Relation"); Object[] objs ; try { // The first steps for the creation of a LexiconsOntology Ontology ontology = new Ontology(rootIdentifier, rootRelIdentifier, mainLanguage); Lexicon englishLexicon = ontology.getLexicon(mainLanguage); //////////////////// Type Hierarcy //////////////////// Identifier Thing = new Identifier("Thing"); Identifier Object = new Identifier("Object"); objs = new Object[] {Thing, Object }; englishLexicon.linkSubTypesToType(objs, rootIdentifier); objs = new Object[] { new Identifier("contains"), new Identifier("cellWall"), new Identifier("act"), new Identifier("causes"), new Identifier("byMeansOf"), new Identifier("beneficiary"), new Identifier("axisToMeasure"), new Identifier("axisToFace"), new Identifier("axisLevel"), new Identifier("agent"), new Identifier("KMSlotGroup"), new Identifier("cytoplasm"), new Identifier("destination"), new Identifier("direction"), new Identifier("dna"), new Identifier("donor"), new Identifier("enzyme"), new Identifier("genes"), new Identifier("instrument"), new Identifier("hasPart"), new Identifier("axisToFace"), new Identifier("axisLevel"), new Identifier("agent"), new Identifier("KMSlotGroup"), new Identifier("cytoplasm"), new Identifier("plasmaMembrane"), new Identifier("destination"), new Identifier("direction"), new Identifier("dna"), new Identifier("donor"), new Identifier("genes"), new Identifier("hasPart"), new Identifier("intersect"), new Identifier("lifetime"), new Identifier("location"), new Identifier("object"), new Identifier("path"), new Identifier("prevents"), new Identifier("promoter"), new Identifier("purpose"), new Identifier("rate"), new Identifier("result"), new Identifier("resultingState"), new Identifier("rna"), new Identifier("shape"), new Identifier("source"), new Identifier("subevent"), new Identifier("subunit"), new Identifier("terminator"), new Identifier("theEffectedState"), new Identifier("theEnclosure"), new Identifier("timeOfExistence"), new Identifier("timeOfOccurrence"), new Identifier("enables"), new Identifier("instrumeny"), new Identifier("object"), new Identifier("path"), new Identifier("recipient"), new Identifier("attr"), new Identifier("scale") }; englishLexicon.linkSubTypesToType(objs, rootRelIdentifier); Identifier InanimateObject = new Identifier("InanimateObject"); Identifier LivingEntity = new Identifier("LivingEntity"); objs = new Object[] { InanimateObject, LivingEntity }; englishLexicon.linkSubTypesToType(objs, Object); Identifier Entity = new Identifier("Entity"); Identifier Cliche = new Identifier("Cliche"); Identifier Event = new Identifier("Event"); Identifier Slot = new Identifier("Slot"); Identifier Value = new Identifier("Value"); objs = new Object[] { Entity, Cliche, Event, Slot, Value }; englishLexicon.linkSubTypesToType(objs, Thing); Identifier TangibleEntity = new Identifier("TangibleEntity"); Identifier IntangibleEntity = new Identifier("IntangibleEntity"); Identifier Force = new Identifier("Force"); objs = new Object[] { TangibleEntity, IntangibleEntity, Force }; englishLexicon.linkSubTypesToType(objs, Entity); Identifier Substance = new Identifier("Substance"); objs = new Object[] { LivingEntity, Substance }; englishLexicon.linkSubTypesToType(objs, TangibleEntity); Identifier Axis = new Identifier("Axis"); Identifier Shape = new Identifier("Shape"); Identifier Direction = new Identifier("Direction"); Identifier Face = new Identifier("Face"); Identifier Place = new Identifier("Place"); Identifier Scale = new Identifier("Scale"); Identifier UnitOfMeasurement = new Identifier("UnitOfMeasurement"); objs = new Object[] { Axis, Direction, Face, Place, Scale, UnitOfMeasurement, Shape }; englishLexicon.linkSubTypesToType(objs, IntangibleEntity); Identifier Connector = new Identifier("Connector"); Identifier Eucaryoticell = new Identifier("Eucaryoticell"); Identifier Gene = new Identifier("Gene"); Identifier Molecule = new Identifier("Molecule"); Identifier NuclearEnvelopPores = new Identifier("NuclearEnvelopPores"); Identifier Nucleoplasm = new Identifier("Nucleoplasm"); Identifier Organelles = new Identifier("Organelles"); Identifier Separator = new Identifier("Separator"); Identifier Waste = new Identifier("Waste"); objs = new Object[] { Connector, Eucaryoticell, Gene, Molecule, NuclearEnvelopPores, Nucleoplasm, Organelles, Separator, Waste }; englishLexicon.linkSubTypesToType(objs, InanimateObject); Identifier Bond = new Identifier("Bond"); objs = new Object[] { Bond }; englishLexicon.linkSubTypesToType(objs, Connector); Identifier CovalentBond = new Identifier("CovalentBond"); Identifier HydrogendBond = new Identifier("HydrogendBond"); Identifier PhosphoDiesterBond = new Identifier("PhosphoDiesterBond"); objs = new Object[] { CovalentBond, HydrogendBond, Gene }; englishLexicon.linkSubTypesToType(objs, Bond); Identifier Person = new Identifier("Person"); Identifier Organism = new Identifier("Organism"); objs = new Object[] { Organism, Person }; englishLexicon.linkSubTypesToType(objs, LivingEntity); Identifier ReflexiveCliche = new Identifier("ReflexiveCliche"); objs = new Object[] { ReflexiveCliche }; englishLexicon.linkSubTypesToType(objs, Cliche); Identifier Action = new Identifier("Action"); Identifier State = new Identifier("State"); objs = new Object[] { Action, State }; englishLexicon.linkSubTypesToType(objs, Event); Identifier CardinalValue = new Identifier("CardinalValue"); Identifier CategoricalValue = new Identifier("CategoricalValue"); Identifier ScalarValue = new Identifier("ScalarValue"); objs = new Object[] { CardinalValue, CategoricalValue, ScalarValue }; englishLexicon.linkSubTypesToType(objs, Value); Identifier Slowly = new Identifier("Slowly"); objs = new Object[] { Slowly }; englishLexicon.linkSubTypesToType(objs, CardinalValue); Identifier TimeInterval = new Identifier("TimeInterval"); objs = new Object[] { TimeInterval }; englishLexicon.linkSubTypesToType(objs, CategoricalValue); Identifier Pressure = new Identifier("Pressure"); objs = new Object[] { Pressure }; englishLexicon.linkSubTypesToType(objs, Force); Identifier Fluid = new Identifier("Fluid"); Identifier FluidOrParticleOrEMWave = new Identifier("FluidOrParticleOrEMWave"); Identifier Food = new Identifier("Food"); Identifier ParticulateMatter = new Identifier("ParticulateMatter"); Identifier SolubleSubstance = new Identifier("SolubleSubstance"); objs = new Object[] { Fluid, FluidOrParticleOrEMWave, Food, ParticulateMatter, SolubleSubstance }; englishLexicon.linkSubTypesToType(objs, Substance); Identifier BindingSite = new Identifier("BindingSite"); Identifier NonCodingRegion = new Identifier("NonCodingRegion"); Identifier Portal = new Identifier("Portal"); Identifier Promoter = new Identifier("Promoter"); Identifier Region = new Identifier("Region"); Identifier RegulatoryRegion = new Identifier("RegulatoryRegion"); Identifier RegulatorySite = new Identifier("RegulatorySite"); Identifier Terminator = new Identifier("Terminator"); objs = new Object[] { BindingSite, NonCodingRegion, Portal, Promoter, Region, RegulatoryRegion, RegulatorySite, Terminator }; englishLexicon.linkSubTypesToType(objs, Place); Identifier AgeScale = new Identifier("AgeScale"); Identifier AreaScale = new Identifier("AreaScale"); Identifier CapacityScale = new Identifier("CapacityScale"); Identifier DensityScale = new Identifier("DensityScale"); Identifier DepthScale = new Identifier("DepthScale"); Identifier HeightScale = new Identifier("HeightScale"); Identifier LengthScale = new Identifier("LengthScale"); Identifier MassScale = new Identifier("MassScale"); Identifier TemperutareScale = new Identifier("TemperutareScale"); Identifier VolumeScale = new Identifier("VolumeScale"); objs = new Object[] { AgeScale, AreaScale, CapacityScale, DensityScale, VolumeScale, DepthScale, HeightScale, LengthScale, MassScale, TemperutareScale }; englishLexicon.linkSubTypesToType(objs, Scale); Identifier UoMArea = new Identifier("UoMArea"); Identifier UoMDensity = new Identifier("UoMDensity"); Identifier UoMLength = new Identifier("UoMLength"); Identifier UoMMass = new Identifier("UoMMass"); Identifier UoMTemperutare = new Identifier("UoMTemperutare"); Identifier UoMVolume = new Identifier("UoMVolume"); objs = new Object[] { UoMArea, UoMDensity, UoMLength, UoMMass, UoMTemperutare, UoMVolume }; englishLexicon.linkSubTypesToType(objs, UnitOfMeasurement); Identifier Base = new Identifier("Base"); Identifier MacroMolecule = new Identifier("MacroMolecule"); Identifier OrganicMolecule = new Identifier("OrganicMolecule"); objs = new Object[] { Base, MacroMolecule, OrganicMolecule }; englishLexicon.linkSubTypesToType(objs, Molecule); Identifier EndoplasmiReticulum = new Identifier("EndoplasmiReticulum"); Identifier GolgiBody = new Identifier("GolgiBody"); Identifier Lysosom = new Identifier("Lysosom"); Identifier Mitochondrion = new Identifier("Mitochondrion"); Identifier Nucleus = new Identifier("Nucleus"); Identifier Peroxisome = new Identifier("Peroxisome"); Identifier Vesicle = new Identifier("Vesicle"); objs = new Object[] { EndoplasmiReticulum, GolgiBody, Lysosom, Mitochondrion, Nucleus, Peroxisome, Vesicle }; englishLexicon.linkSubTypesToType(objs, Organelles); Identifier Barrier = new Identifier("Barrier"); objs = new Object[] { Barrier }; englishLexicon.linkSubTypesToType(objs, Separator); Identifier Eucaryote = new Identifier("Eucaryote"); Identifier Procaryote = new Identifier("Procaryote"); objs = new Object[] { Eucaryote, Procaryote }; englishLexicon.linkSubTypesToType(objs, Organism); Identifier Enter = new Identifier("Enter"); Identifier Exit = new Identifier("Exit"); Identifier Leave = new Identifier("Leave"); Identifier Locomotion = new Identifier("Locomotion"); Identifier Traverse = new Identifier("Traverse"); objs = new Object[] { Enter, Exit, Leave, Locomotion, Traverse }; englishLexicon.linkSubTypesToType(objs, ReflexiveCliche); Identifier Create = new Identifier("Create"); Identifier Damage = new Identifier("Damage"); Identifier Move = new Identifier("Move"); Identifier Obstruct = new Identifier("Obstruct"); Identifier Restore = new Identifier("Restore"); Identifier Transfer = new Identifier("Transfer"); Identifier Unobstruct = new Identifier("Unobstruct"); Identifier Obtain = new Identifier("Obtain"); Identifier TakeControl = new Identifier("TakeControl"); objs = new Object[] { Create, Damage, Move, Obstruct, Restore, Transfer, Unobstruct, Obtain, TakeControl }; englishLexicon.linkSubTypesToType(objs, Action); Identifier BeObstructed = new Identifier("BeObstructed"); Identifier BeTouching = new Identifier("BeTouching"); Identifier BeBroken = new Identifier("BeBroken"); Identifier BeRestrained = new Identifier("BeRestrained"); Identifier BookTaken = new Identifier("BookTaken"); objs = new Object[] { BeObstructed, BeTouching, BeBroken, BeRestrained, BookTaken }; englishLexicon.linkSubTypesToType(objs, State); Identifier AgeScalar = new Identifier("AgeScalar"); Identifier AreaScalar = new Identifier("AreaScalar"); Identifier DensityScalar = new Identifier("DensityScalar"); Identifier DepthScalar = new Identifier("DepthScalar"); Identifier HeightScalar = new Identifier("HeightScalar"); Identifier LengthScalar = new Identifier("LengthScalar"); Identifier MassScalar = new Identifier("MassScalar"); Identifier TemperutareScalar = new Identifier("TemperutareScalar"); Identifier VolumeScalar = new Identifier("VolumeScalar"); Identifier WidthScalar = new Identifier("WidthScalar"); Identifier CapacityScalar = new Identifier("CapacityScalar"); Identifier TimeScalar = new Identifier("TimeScalar"); objs = new Object[] { DensityScalar, DepthScalar, HeightScalar, LengthScalar, MassScalar, TemperutareScalar, VolumeScalar, WidthScalar, AreaScalar, CapacityScalar, TimeScalar }; englishLexicon.linkSubTypesToType(objs, ScalarValue); Identifier Minute = new Identifier("Minute"); objs = new Object[] { Minute }; englishLexicon.linkSubTypesToType(objs, TimeScalar); Identifier NuclearPore = new Identifier("NuclearPore"); objs = new Object[] { NuclearPore }; englishLexicon.linkSubTypesToType(objs, Portal); Identifier NucleicAcidRegion = new Identifier("NucleicAcidRegion"); Identifier ProteinRegion = new Identifier("ProteinRegion"); objs = new Object[] { NucleicAcidRegion, ProteinRegion }; englishLexicon.linkSubTypesToType(objs, Region); Identifier DNARegulatorySite = new Identifier("DNARegulatorySite"); objs = new Object[] { DNARegulatorySite }; englishLexicon.linkSubTypesToType(objs, RegulatorySite); Identifier Adenine = new Identifier("Adenine"); Identifier Cytosine = new Identifier("Cytosine"); Identifier Guanine = new Identifier("Guanine"); Identifier Thymine = new Identifier("Thymine"); Identifier Uracil = new Identifier("MassScalar"); objs = new Object[] { Adenine, Cytosine, Guanine, Thymine, Uracil }; englishLexicon.linkSubTypesToType(objs, Base); Identifier NucleicAcid = new Identifier("NucleicAcid"); Identifier NucleoProtein = new Identifier("NucleoProtein"); Identifier Polypeptide = new Identifier("Polypeptide"); objs = new Object[] { NucleicAcid, NucleoProtein, Polypeptide }; englishLexicon.linkSubTypesToType(objs, MacroMolecule); Identifier Chromosome = new Identifier("Chromosome"); Identifier Ribosome = new Identifier("Ribosome"); Identifier SigmaFactor = new Identifier("SigmaFactor"); Identifier SnRNPs = new Identifier("SnRNPs"); objs = new Object[] { Chromosome, Ribosome, SigmaFactor, SnRNPs }; englishLexicon.linkSubTypesToType(objs, NucleoProtein); Identifier Monomers = new Identifier("Monomers"); objs = new Object[] { Monomers }; englishLexicon.linkSubTypesToType(objs, OrganicMolecule); Identifier Enclosure = new Identifier("Enclosure"); objs = new Object[] { Enclosure }; englishLexicon.linkSubTypesToType(objs, Barrier); Identifier Invade = new Identifier("Invade"); objs = new Object[] { Invade }; englishLexicon.linkSubTypesToType(objs, Enter); Identifier Copy = new Identifier("Copy"); Identifier Form = new Identifier("Form"); objs = new Object[] { Copy, Form }; englishLexicon.linkSubTypesToType(objs, Create); Identifier Break = new Identifier("Break"); objs = new Object[] { Break }; englishLexicon.linkSubTypesToType(objs, Damage); Identifier Carry = new Identifier("Carry"); Identifier Fall = new Identifier("Fall"); Identifier MoveFrom = new Identifier("MoveFrom"); Identifier MoveTo = new Identifier("MoveTo"); Identifier MoveOutFrom = new Identifier("MoveOutFrom"); Identifier MoveThrough = new Identifier("MoveThrough"); objs = new Object[] { Carry, Fall, MoveFrom, MoveTo, Locomotion, MoveThrough, MoveOutFrom }; englishLexicon.linkSubTypesToType(objs, Move); objs = new Object[] { Traverse }; englishLexicon.linkSubTypesToType(objs, MoveThrough); Identifier Block = new Identifier("Block"); Identifier Confine = new Identifier("Confine"); Identifier Hold = new Identifier("Hold"); Identifier Restrain = new Identifier("Restrain"); Identifier ShutOut = new Identifier("ShutOut"); Identifier Support = new Identifier("Support"); objs = new Object[] { Block, Confine, Hold, Restrain, ShutOut, Support }; englishLexicon.linkSubTypesToType(objs, Obstruct); Identifier Repair = new Identifier("Repair"); objs = new Object[] { Repair }; englishLexicon.linkSubTypesToType(objs, Restore); Identifier Lose = new Identifier("Lose"); Identifier Receive = new Identifier("Receive"); objs = new Object[] { Lose, Receive }; englishLexicon.linkSubTypesToType(objs, Transfer); Identifier Admit = new Identifier("Admit"); Identifier LetGoOf = new Identifier("LetGoOf"); Identifier Release = new Identifier("Release"); Identifier Unblock = new Identifier("Unblock"); Identifier Unrestrain = new Identifier("Unrestrain"); objs = new Object[] { Admit, LetGoOf, Release, Unblock, Unrestrain }; englishLexicon.linkSubTypesToType(objs, Unobstruct); Identifier BeBlocked = new Identifier("BeBlocked"); Identifier BeConfined = new Identifier("BeConfined"); Identifier BeHeld = new Identifier("BeHeld"); Identifier BeShutOut = new Identifier("BeShutOut"); Identifier BeSupported = new Identifier("BeSupported"); objs = new Object[] { BeBlocked, BeConfined, BeHeld, BeShutOut, BeSupported }; englishLexicon.linkSubTypesToType(objs, BeObstructed); Identifier GeneRegion = new Identifier("GeneRegion"); Identifier RNARegion = new Identifier("RNARegion"); Identifier DNARegion = new Identifier("DNARegion"); objs = new Object[] { GeneRegion, RNARegion, DNARegion }; englishLexicon.linkSubTypesToType(objs, NucleicAcidRegion); Identifier DNACodingRegion = new Identifier("DNACodingRegion"); Identifier DNANonCodingRegion = new Identifier("DNANonCodingRegion"); objs = new Object[] { DNACodingRegion, DNANonCodingRegion }; englishLexicon.linkSubTypesToType(objs, DNARegion); Identifier Exon = new Identifier("Exon"); Identifier Operon = new Identifier("Operon"); Identifier DNACodon = new Identifier("DNACodon"); objs = new Object[] { Exon, Gene, DNACodon, Operon }; englishLexicon.linkSubTypesToType(objs, DNACodingRegion); Identifier DNARegulatoryRegion = new Identifier("DNARegulatoryRegion"); Identifier NonTranscribedRegion = new Identifier("NonTranscribedRegion"); objs = new Object[] { DNARegulatoryRegion, NonTranscribedRegion }; englishLexicon.linkSubTypesToType(objs, DNANonCodingRegion); Identifier Enhancer = new Identifier("Enhancer"); objs = new Object[] { Enhancer, Terminator }; englishLexicon.linkSubTypesToType(objs, DNARegulatoryRegion); Identifier SpacerDNARegion = new Identifier("SpacerDNARegion"); objs = new Object[] { SpacerDNARegion }; englishLexicon.linkSubTypesToType(objs, NonTranscribedRegion); Identifier RNA3End = new Identifier("RNA3End"); Identifier RNA5End = new Identifier("RNA5End"); Identifier RNACodingRegion = new Identifier("RNACodingRegion"); Identifier RNANonCodingRegion = new Identifier("RNANonCodingRegion"); Identifier RNATranslatedRegion = new Identifier("RNATranslatedRegion"); objs = new Object[] { RNA3End, RNA5End, RNACodingRegion, RNANonCodingRegion, RNATranslatedRegion }; englishLexicon.linkSubTypesToType(objs, RNARegion); Identifier RNACodon = new Identifier("RNACodon"); objs = new Object[] { RNACodon }; englishLexicon.linkSubTypesToType(objs, RNACodingRegion); Identifier RNARegulatoryRegion = new Identifier("RNARegulatoryRegion"); objs = new Object[] { RNARegulatoryRegion }; englishLexicon.linkSubTypesToType(objs, RNANonCodingRegion); Identifier AminoAcidCodon = new Identifier("AminoAcidCodon"); Identifier ProteinInitiatorCodon = new Identifier("ProteinInitiatorCodon"); Identifier ProteinStopCodon = new Identifier("ProteinStopCodon"); objs = new Object[] { AminoAcidCodon, ProteinInitiatorCodon, ProteinStopCodon }; englishLexicon.linkSubTypesToType(objs, RNARegulatoryRegion); Identifier UAG = new Identifier("UAG"); Identifier UGA = new Identifier("UGA"); Identifier UUA = new Identifier("UUA"); objs = new Object[] { UAG, UGA, UUA }; englishLexicon.linkSubTypesToType(objs, ProteinStopCodon); Identifier AminoTerminalEnd = new Identifier("AminoTerminalEnd"); Identifier CarboxyTerminalEnd = new Identifier("CarboxyTerminalEnd"); objs = new Object[] { AminoTerminalEnd, CarboxyTerminalEnd }; englishLexicon.linkSubTypesToType(objs, ProteinRegion); Identifier PromoterRegion = new Identifier("PromoterRegion"); Identifier TerminatorSite = new Identifier("TerminatorSite"); objs = new Object[] { PromoterRegion, Promoter, TerminatorSite }; englishLexicon.linkSubTypesToType(objs, DNARegulatorySite); Identifier DNAStrand = new Identifier("DNAStrand"); Identifier DNA = new Identifier("DNA"); Identifier RNA = new Identifier("RNA"); objs = new Object[] { DNAStrand, DNA, RNA }; englishLexicon.linkSubTypesToType(objs, NucleicAcid); Identifier Protein = new Identifier("Protein"); objs = new Object[] { Protein }; englishLexicon.linkSubTypesToType(objs, Polypeptide); Identifier Monosaccharide = new Identifier("Monosaccharide"); objs = new Object[] { Monosaccharide }; englishLexicon.linkSubTypesToType(objs, Monomers); Identifier Bacteria = new Identifier("Bacteria"); Identifier CellWall = new Identifier("CellWall"); Identifier Container = new Identifier("Container"); Identifier Cytoplasm = new Identifier("Cytoplasm"); Identifier Membrane = new Identifier("Membrane"); Identifier PlasmaMembrane = new Identifier("PlasmaMembrane"); objs = new Object[] { Bacteria, CellWall, Container, Cytoplasm, Membrane, PlasmaMembrane }; englishLexicon.linkSubTypesToType(objs, Enclosure); Identifier Chain = new Identifier("Chain"); Identifier Helix = new Identifier("Helix"); Identifier Lariat = new Identifier("Lariat"); Identifier Strand = new Identifier("Strand"); objs = new Object[] { Chain, Helix, Lariat, Strand }; englishLexicon.linkSubTypesToType(objs, Form); Identifier Breach = new Identifier("Breach"); Identifier Destroy = new Identifier("Destroy"); Identifier Ruin = new Identifier("Ruin"); objs = new Object[] { Breach, Destroy, Ruin }; englishLexicon.linkSubTypesToType(objs, Break); Identifier Disperse = new Identifier("Disperse"); Identifier Emit = new Identifier("Emit"); Identifier MoveOutOf = new Identifier("MoveOutOf"); objs = new Object[] { Disperse, Emit, Leave, MoveOutOf }; englishLexicon.linkSubTypesToType(objs, MoveFrom); Identifier GoTo = new Identifier("GoTo"); Identifier MoveInto = new Identifier("MoveInto"); Identifier MoveTogether = new Identifier("MoveTogether"); objs = new Object[] { GoTo, MoveInto, MoveTogether }; englishLexicon.linkSubTypesToType(objs, MoveTo); Identifier Relinquish = new Identifier("Relinquish"); Identifier Take = new Identifier("Take"); objs = new Object[] { Relinquish, Take }; englishLexicon.linkSubTypesToType(objs, Lose); Identifier Deliver = new Identifier("Deliver"); Identifier Give = new Identifier("Give"); objs = new Object[] { Deliver, Give }; englishLexicon.linkSubTypesToType(objs, Receive); Identifier Intron = new Identifier("Intron"); objs = new Object[] { Exon, Intron }; englishLexicon.linkSubTypesToType(objs, GeneRegion); Identifier PeptideChain = new Identifier("PeptideChain"); Identifier RNAChain = new Identifier("RNAChain"); objs = new Object[] { PeptideChain, RNAChain }; englishLexicon.linkSubTypesToType(objs, Chain); Identifier DoubleHelix = new Identifier("DoubleHelix"); objs = new Object[] { DoubleHelix }; englishLexicon.linkSubTypesToType(objs, Helix); objs = new Object[] { DNAStrand }; englishLexicon.linkSubTypesToType(objs, Strand); Identifier Penetrate = new Identifier("Penetrate"); objs = new Object[] { Penetrate }; englishLexicon.linkSubTypesToType(objs, Breach); Identifier Eject = new Identifier("Eject"); Identifier Exude = new Identifier("Exude"); Identifier Expel = new Identifier("Expel"); Identifier Secrete = new Identifier("Secrete"); objs = new Object[] { Eject, Exit, Exude, Expel, Secrete }; englishLexicon.linkSubTypesToType(objs, MoveOutOf); Identifier Excrete = new Identifier("Excrete"); Identifier Extrude = new Identifier("Extrude"); objs = new Object[] { Excrete, Extrude }; englishLexicon.linkSubTypesToType(objs, Expel); Identifier TakeIn = new Identifier("TakeIn"); Identifier TakeUp = new Identifier("TakeUp"); Identifier UpTake = new Identifier("UpTake"); objs = new Object[] { Enter, TakeIn, TakeUp, UpTake }; englishLexicon.linkSubTypesToType(objs, MoveInto); Identifier Absorb = new Identifier("Absorb"); objs = new Object[] { Absorb }; englishLexicon.linkSubTypesToType(objs, TakeIn); Identifier Endocytose = new Identifier("Endocytose"); objs = new Object[] { Endocytose }; englishLexicon.linkSubTypesToType(objs, TakeUp); Identifier Phagocytose = new Identifier("Phagocytose"); Identifier Pinocytose = new Identifier("Pinocytose"); objs = new Object[] { Phagocytose, Pinocytose }; englishLexicon.linkSubTypesToType(objs, Endocytose); Identifier ComeTogether = new Identifier("ComeTogether"); Identifier MakeContact = new Identifier("MakeContact"); objs = new Object[] { ComeTogether, MakeContact }; englishLexicon.linkSubTypesToType(objs, MoveTogether); Identifier Dispatch = new Identifier("Dispatch"); objs = new Object[] { Dispatch, Give }; englishLexicon.linkSubTypesToType(objs, Relinquish); Identifier Donate = new Identifier("Donate"); Identifier Send = new Identifier("Send"); Identifier Supply = new Identifier("Supply"); objs = new Object[] { Donate, Send, Supply }; englishLexicon.linkSubTypesToType(objs, Give); Identifier Deoxyribonucleotide = new Identifier("Deoxyribonucleotide"); Identifier Enzyme = new Identifier("Enzyme"); Identifier ProteinComplex = new Identifier("ProteinComplex"); Identifier RegulatoryProtein = new Identifier("RegulatoryProtein"); Identifier Ribonucleotide = new Identifier("Ribonucleotide"); Identifier UbiquinatedProtein = new Identifier("UbiquinatedProtein"); objs = new Object[] { Deoxyribonucleotide, Enzyme, ProteinComplex, RegulatoryProtein, Ribonucleotide, UbiquinatedProtein, RNA }; englishLexicon.linkSubTypesToType(objs, Protein); Identifier AnabolicEnzyme = new Identifier("AnabolicEnzyme"); Identifier CatalyticEnzyme = new Identifier("CatalyticEnzyme"); Identifier EnzymeComplex = new Identifier("EnzymeComplex"); Identifier PeptidylTransferase = new Identifier("PeptidylTransferase"); Identifier RNAPolymerase = new Identifier("RNAPolymerase"); Identifier UbiquitinBindingEnzyme = new Identifier("UbiquitinBindingEnzyme"); objs = new Object[] { AnabolicEnzyme, CatalyticEnzyme, EnzymeComplex, PeptidylTransferase, RNAPolymerase, UbiquitinBindingEnzyme }; englishLexicon.linkSubTypesToType(objs, Enzyme); Identifier Polymerase = new Identifier("Polymerase"); objs = new Object[] { Polymerase }; englishLexicon.linkSubTypesToType(objs, AnabolicEnzyme); Identifier Protease = new Identifier("Protease"); objs = new Object[] { Protease }; englishLexicon.linkSubTypesToType(objs, CatalyticEnzyme); objs = new Object[] { SnRNPs }; englishLexicon.linkSubTypesToType(objs, EnzymeComplex); Identifier BacterialRNAPolymerase = new Identifier("BacterialRNAPolymerase"); objs = new Object[] { BacterialRNAPolymerase }; englishLexicon.linkSubTypesToType(objs, RNAPolymerase); Identifier DNAPolymerase = new Identifier("DNAPolymerase"); objs = new Object[] { RNAPolymerase, DNAPolymerase }; englishLexicon.linkSubTypesToType(objs, Polymerase); Identifier Proteasome = new Identifier("Proteasome"); Identifier RibosomalProteins = new Identifier("RibosomalProteins"); objs = new Object[] { Proteasome, RibosomalProteins }; englishLexicon.linkSubTypesToType(objs, ProteinComplex); Identifier Nucleotide = new Identifier("Nucleotide"); objs = new Object[] { Nucleotide }; englishLexicon.linkSubTypesToType(objs, Monosaccharide); objs = new Object[] { Ribonucleotide, Deoxyribonucleotide }; englishLexicon.linkSubTypesToType(objs, Nucleotide); Identifier RNATranscript = new Identifier("RNATranscript"); objs = new Object[] { RNATranscript }; englishLexicon.linkSubTypesToType(objs, RNA); objs = new Object[] { Invade }; englishLexicon.linkSubTypesToType(objs, Enter); Identifier ComeIntoContact = new Identifier("ComeIntoContact"); objs = new Object[] { ComeIntoContact }; englishLexicon.linkSubTypesToType(objs, ComeTogether); Identifier Feed = new Identifier("Feed"); objs = new Object[] { Feed }; englishLexicon.linkSubTypesToType(objs, Supply); Identifier ProteinChaperone = new Identifier("ProteinChaperone"); Identifier RibosomeReleaseFactor = new Identifier("RibosomeReleaseFactor"); Identifier TranslationInitiationFactor = new Identifier("TranslationInitiationFactor"); Identifier Ubiquitin = new Identifier("Ubiquitin"); objs = new Object[] { ProteinChaperone, RibosomeReleaseFactor, TranslationInitiationFactor, Ubiquitin }; englishLexicon.linkSubTypesToType(objs, RegulatoryProtein); Identifier PrimaryRNATranscript = new Identifier("PrimaryRNATranscript"); Identifier RRNA = new Identifier("RRNA"); Identifier TRNA = new Identifier("TRNA"); Identifier MRNA = new Identifier("MRNA"); objs = new Object[] { PrimaryRNATranscript, RRNA, TRNA, MRNA }; englishLexicon.linkSubTypesToType(objs, RNATranscript); Identifier AdenosineTriphosphate = new Identifier("AdenosineTriphosphate"); Identifier CytidineMonophosphate = new Identifier("CytidineMonophosphate"); Identifier CytidineTriphosphate = new Identifier("CytidineTriphosphate"); Identifier GuanosineMonophosphate = new Identifier("GuanosineMonophosphate"); Identifier GuanosineTriphosphate = new Identifier("GuanosineTriphosphate"); Identifier MethylGuanine = new Identifier("MethylGuanine"); Identifier ThymidineMonophosphate = new Identifier("ThymidineMonophosphate"); Identifier ThymidineTriphosphate = new Identifier("ThymidineTriphosphate"); Identifier UridineMonophosphate = new Identifier("UridineMonophosphate"); Identifier UridineTriphosphate = new Identifier("UridineTriphosphate"); objs = new Object[] { AdenosineTriphosphate, CytidineMonophosphate, CytidineTriphosphate, GuanosineMonophosphate, GuanosineTriphosphate, MethylGuanine, RNA, ThymidineMonophosphate, ThymidineTriphosphate, UridineMonophosphate, UridineTriphosphate }; englishLexicon.linkSubTypesToType(objs, Ribonucleotide); Identifier DeoxyAdenosineMonophosphate = new Identifier("DeoxyAdenosineMonophosphate"); Identifier DexoyCytidineMonophosphate = new Identifier("DexoyCytidineMonophosphate"); Identifier DexoyGuanosineMonophosphate = new Identifier("DexoyGuanosineMonophosphate"); Identifier DexoyThymidineMonophosphate = new Identifier("DexoyThymidineMonophosphate"); objs = new Object[] { DeoxyAdenosineMonophosphate, DexoyCytidineMonophosphate, DexoyGuanosineMonophosphate, DexoyThymidineMonophosphate }; englishLexicon.linkSubTypesToType(objs, Deoxyribonucleotide); ///////////////////////// Type Hierachy Continued /////////////////////// Identifier Breacher = new Identifier("Breacher"); Identifier Book = new Identifier("Book"); Identifier Children = new Identifier("Children"); Identifier Dominoes = new Identifier("Dominoes"); Identifier Pizza = new Identifier("Pizza"); Identifier PurpleShirt = new Identifier("PurpleShirt"); Identifier SalvationArmy = new Identifier("SalvationArmy"); Identifier Student = new Identifier("Student"); Identifier Sweat = new Identifier("Sweat"); Identifier TV = new Identifier("TV"); Identifier DeliveryGuy = new Identifier("DeliveryGuy"); Identifier AgentPenetrate = new Identifier("AgentPenetrate"); Identifier Maple = new Identifier("Maple"); Identifier Present = new Identifier("Present"); Identifier Gold = new Identifier("Gold"); Identifier Air = new Identifier("Air"); Identifier FredInTake = new Identifier("FredInTake"); Identifier JohnInTake = new Identifier("JohnInTake"); objs = new Object[] { Breacher, Book, Children, Dominoes, Pizza, PurpleShirt, SalvationArmy, Student, Sweat, TV, DeliveryGuy, AgentPenetrate, Maple, Present, Gold, Air, FredInTake, JohnInTake }; englishLexicon.linkSubTypesToType(objs, TangibleEntity); Identifier Tree = new Identifier("Tree"); Identifier Lungs = new Identifier("Lungs"); Identifier Cell = new Identifier("Cell"); Identifier Flighterjet = new Identifier("Flighterjet"); Identifier Runner = new Identifier("Runner"); Identifier Earth = new Identifier("Earth"); Identifier Troy = new Identifier("Troy"); Identifier Bag = new Identifier("Bag"); Identifier House = new Identifier("House"); objs = new Object[] { Flighterjet, House, Runner, Earth, Cell, Tree, Troy, Bag, Lungs }; englishLexicon.linkSubTypesToType(objs, Enclosure); Identifier Midfield = new Identifier("Midfield"); Identifier Restaurant = new Identifier("Restaurant"); Identifier GoalLine = new Identifier("GoalLine"); Identifier Mall = new Identifier("Mall"); Identifier HouseLocation = new Identifier("HouseLocation"); Identifier RunnerLocation = new Identifier("RunnerLocation"); Identifier InsideTheHouse = new Identifier("InsideTheHouse"); Identifier TroyLocation = new Identifier("TroyLocation"); Identifier EarthLocation = new Identifier("EarthLocation"); objs = new Object[] { Midfield, Restaurant, GoalLine, Mall, HouseLocation, RunnerLocation, InsideTheHouse, TroyLocation, EarthLocation }; englishLexicon.linkSubTypesToType(objs, Place); Identifier Plant = new Identifier("Plant"); Identifier Pilot = new Identifier("Pilot"); objs = new Object[] { Plant, Pilot }; englishLexicon.linkSubTypesToType(objs, Organism); Identifier HollowVolume = new Identifier("HollowVolume"); objs = new Object[] { HollowVolume }; englishLexicon.linkSubTypesToType(objs, Shape); Identifier Sap = new Identifier("Sap"); Identifier Oil = new Identifier("Oil"); objs = new Object[] { Oil, Sap }; englishLexicon.linkSubTypesToType(objs, Substance); Identifier Door = new Identifier("Door"); Identifier Mouth = new Identifier("Mouth"); Identifier Nose = new Identifier("Nose"); objs = new Object[] { Portal, Door, Mouth, Nose }; englishLexicon.linkSubTypesToType(objs, Portal); Identifier Spy = new Identifier("Spy"); objs = new Object[] { Spy }; englishLexicon.linkSubTypesToType(objs, Person); Identifier BluePackage = new Identifier("BluePackage"); Identifier Money = new Identifier("Money"); Identifier TrojanHorse = new Identifier("TrojanHorse"); Identifier SoccerBall = new Identifier("SoccerBall"); Identifier SoccerPlayer = new Identifier("SoccerPlayer"); Identifier Safety = new Identifier("Safety"); Identifier RunningBack = new Identifier("RunningBack"); objs = new Object[] { BluePackage, Money, TrojanHorse, SoccerBall, SoccerPlayer, Safety, RunningBack }; englishLexicon.linkSubTypesToType(objs, Object); Identifier Water = new Identifier("Water"); objs = new Object[] { Water }; englishLexicon.linkSubTypesToType(objs, Fluid); ///////////// Individuals ///////////////////////// Identifier SunLight = new Identifier("SunLight"); objs = new Object[] { SunLight }; englishLexicon.linkIndividualsToType(objs, FluidOrParticleOrEMWave); Identifier MotherTeresa = new Identifier("MotherTeresa"); objs = new Object[] { MotherTeresa }; englishLexicon.linkIndividualsToType(objs, LivingEntity); Identifier jamesBond = new Identifier("jamesBond"); objs = new Object[] { jamesBond }; englishLexicon.linkIndividualsToType(objs, Person); Identifier Sun = new Identifier("Sun"); Identifier JohnsLocation = new Identifier("JohnsLocation"); Identifier Boston = new Identifier("Boston"); Identifier Austin = new Identifier("Austin"); Identifier Russia = new Identifier("Russia"); Identifier Alaska = new Identifier("Alaska"); Identifier Indiana = new Identifier("Indiana"); Identifier US = new Identifier("US"); objs = new Object[] { Russia, Alaska, Sun, Boston, Austin, Indiana, Sun, JohnsLocation, US }; englishLexicon.linkIndividualsToType(objs, Place); Identifier John = new Identifier("John"); Identifier Ken = new Identifier("Ken"); Identifier Tim = new Identifier("Tim"); objs = new Object[] { John, Ken, Tim }; englishLexicon.linkIndividualsToType(objs, Organism); Identifier Albert = new Identifier("Albert"); Identifier Steven = new Identifier("Steven"); Identifier Bill = new Identifier("Bill"); Identifier Victor = new Identifier("Victor"); Identifier Maurice = new Identifier("Maurice"); Identifier Fred = new Identifier("Fred"); Identifier David = new Identifier("David"); Identifier Lava = new Identifier("Lava"); Identifier Mark = new Identifier("Mark"); Identifier Mary = new Identifier("Mary"); Identifier Randy = new Identifier("Randy"); Identifier Samuel = new Identifier("Samuel"); objs = new Object[] { Albert, David, Lava, Mark, Steven, Bill, Victor, Maurice, Fred, Mary, Randy, Samuel }; englishLexicon.linkIndividualsToType(objs, TangibleEntity); ///////////// Conceptual Structures ///////////////////////// Type AbsorbType = englishLexicon.getTypeCS(Absorb); Type ActionType = englishLexicon.getTypeCS(Action); Type AdmitType = englishLexicon.getTypeCS(Admit); Type AxisType = englishLexicon.getTypeCS(Axis); Type BacteriaType = englishLexicon.getTypeCS(Bacteria); Type BarrierType = englishLexicon.getTypeCS(Barrier); Type BeBlockedType = englishLexicon.getTypeCS(BeBlocked); Type BeConfinedType = englishLexicon.getTypeCS(BeConfined); Type BeHeldType = englishLexicon.getTypeCS(BeHeld); Type BeObstructedType = englishLexicon.getTypeCS(BeObstructed); Type BeShutOutType = englishLexicon.getTypeCS(BeShutOut); Type BeSupportedType = englishLexicon.getTypeCS(BeSupported); Type BeTouchingType = englishLexicon.getTypeCS(BeTouching); Type BlockType = englishLexicon.getTypeCS(Block); Type BreachType = englishLexicon.getTypeCS(Breach); Type BreakType = englishLexicon.getTypeCS(Break); Type CarryType = englishLexicon.getTypeCS(Carry); Type CellWallType = englishLexicon.getTypeCS(CellWall); Type ComeIntoContactType = englishLexicon.getTypeCS(ComeIntoContact); Type ComeTogetherType = englishLexicon.getTypeCS(ComeTogether); Type ConfineType = englishLexicon.getTypeCS(Confine); Type ContainerType = englishLexicon.getTypeCS(Container); Type CopyType = englishLexicon.getTypeCS(Copy); Type CreateType = englishLexicon.getTypeCS(Create); Type CytoplasmType = englishLexicon.getTypeCS(Cytoplasm); Type DNAType = englishLexicon.getTypeCS(DNA); Type DeliverType = englishLexicon.getTypeCS(Deliver); Type DestroyType = englishLexicon.getTypeCS(Destroy); Type DispatchType = englishLexicon.getTypeCS(Dispatch); Type DisperseType = englishLexicon.getTypeCS(Disperse); Type DonateType = englishLexicon.getTypeCS(Donate); Type EjectType = englishLexicon.getTypeCS(Eject); Type EmitType = englishLexicon.getTypeCS(Emit); Type EndocytoseType = englishLexicon.getTypeCS(Endocytose); Type EucaryoteType = englishLexicon.getTypeCS(Eucaryote); Type EventType = englishLexicon.getTypeCS(Event); Type ExcreteType = englishLexicon.getTypeCS(Excrete); Type ExpelType = englishLexicon.getTypeCS(Expel); Type ExtrudeType = englishLexicon.getTypeCS(Extrude); Type ExudeType = englishLexicon.getTypeCS(Exude); Type FallType = englishLexicon.getTypeCS(Fall); Type FormType = englishLexicon.getTypeCS(Form); Type GoToType = englishLexicon.getTypeCS(GoTo); Type HoldType = englishLexicon.getTypeCS(Hold); Type InvadeType = englishLexicon.getTypeCS(Invade); Type LetGoOfType = englishLexicon.getTypeCS(LetGoOf); Type LoseType = englishLexicon.getTypeCS(Lose); Type MRNAType = englishLexicon.getTypeCS(MRNA); Type MakeContactType = englishLexicon.getTypeCS(MakeContact); Type MoveFromType = englishLexicon.getTypeCS(MoveFrom); Type MoveIntoType = englishLexicon.getTypeCS(MoveInto); Type MoveOutOfType = englishLexicon.getTypeCS(MoveOutOf); Type MoveThroughType = englishLexicon.getTypeCS(MoveThrough); Type MoveToType = englishLexicon.getTypeCS(MoveTo); Type MoveTogetherType = englishLexicon.getTypeCS(MoveTogether); Type MoveType = englishLexicon.getTypeCS(Move); Type NuclearEnvelopePoresType = englishLexicon.getTypeCS(NuclearEnvelopPores); Type ObstructType = englishLexicon.getTypeCS(Obstruct); Type PenetrateType = englishLexicon.getTypeCS(Penetrate); Type PhagocytoseType = englishLexicon.getTypeCS(Phagocytose); Type PinocytoseType = englishLexicon.getTypeCS(Pinocytose); Type PortalType = englishLexicon.getTypeCS(Portal); Type ReceiveType = englishLexicon.getTypeCS(Receive); Type ReleaseType = englishLexicon.getTypeCS(Release); Type RepairType = englishLexicon.getTypeCS(Repair); Type RestrainType = englishLexicon.getTypeCS(Restrain); Type RuinType = englishLexicon.getTypeCS(Ruin); Type ScaleType = englishLexicon.getTypeCS(Scale); Type SecreteType = englishLexicon.getTypeCS(Secrete); Type ShutOutType = englishLexicon.getTypeCS(ShutOut); Type SupplyType = englishLexicon.getTypeCS(Supply); Type SupportType = englishLexicon.getTypeCS(Support); Type TakeInType = englishLexicon.getTypeCS(TakeIn); Type TangibleEntityType = englishLexicon.getTypeCS(TangibleEntity); Type TransferType = englishLexicon.getTypeCS(Transfer); Type UnblockType = englishLexicon.getTypeCS(Unblock); Type UnobstructType = englishLexicon.getTypeCS(Unobstruct); Type UnrestrainType = englishLexicon.getTypeCS(Unrestrain ); Type EnclosureType = englishLexicon.getTypeCS(Enclosure); Type EnterType = englishLexicon.getTypeCS(Enter); Type ExitType = englishLexicon.getTypeCS(Exit); Type FeedType = englishLexicon.getTypeCS(Feed); Type GiveType = englishLexicon.getTypeCS(Give); Type LeaveType = englishLexicon.getTypeCS(Leave); Type LocomotionType = englishLexicon.getTypeCS(Locomotion); Type RelinquishType = englishLexicon.getTypeCS(Relinquish); Type SendType = englishLexicon.getTypeCS(Send); Type TakeUpType = englishLexicon.getTypeCS(TakeUp); Type TakeType = englishLexicon.getTypeCS(Take); Type UpTakeType = englishLexicon.getTypeCS(UpTake); ///////////// Definitions ///////////////////////// AbsorbType.setDefinition(CG.parseLF( "[TakeIn:super]-" + "-object->[Fluid],\n" + "-destination->[Place],\n" + "-source->[Place],\n" + "-path->[Portal]" , englishLexicon)); ActionType.setDefinition(CG.parseLF( "[Event:super]-" + "-object->[Thing],\n" + "-agent->[LivingEntity],\n" + "-instrument->[TangibleEntity],\n" + "-subevent->[Action]" , englishLexicon)); AdmitType.setDefinition(CG.parseLF( "[Unobstruct:super]-" + "-theEnclosure->[Enclosure],\n" + "-theEffectedState->[BeShutOut],\n" + "-object->[TangibleEntity]" , englishLexicon)); BacteriaType.setDefinition(CG.parseLF( "[Enclosure:super]-" + "-dna->[DNA],\n" + "-rna->[RNA],\n" + "-enzyme->[Enzyme],\n" + "-cytoplasm->[Cytoplasm #1],\n" + "-plasmaMembrane->[PlasmaMembrane #2],\n" + "-cellWall->[CellWall #3],\n" + "-hasPart->[Cytoplasm #1],\n" + "-hasPart->[PlasmaMembrane #2],\n" + "-hasPart->[CellWall #3]" , englishLexicon)); BarrierType.setDefinition(CG.parseLF( "[Separator:super]-" + "prevents->[Move]" , englishLexicon)); AxisType.setDefinition(CG.parseLF( "[BeObstructed:super]-" + "-object->[TangibleEntity],\n" + "-location->[Place]" , englishLexicon)); BeConfinedType.setDefinition(CG.parseLF( "[BeObstructed:super]-" + "-agent->[TangibleEntity],\n" + "-object->[TangibleEntity]" , englishLexicon)); BeHeldType.setDefinition(CG.parseLF( "[BeObstructed:super]-" + "-agent->[TangibleEntity],\n" + "-object->[TangibleEntity]" , englishLexicon)); BeObstructedType.setDefinition(CG.parseLF( "[State:super]-" + "-object->[TangibleEntity]" , englishLexicon)); BeShutOutType.setDefinition(CG.parseLF( "[BeObstructed:super]-" + "-object->[TangibleEntity]" , englishLexicon)); BeSupportedType.setDefinition(CG.parseLF( "[BeObstructed:super]-" + "-object->[TangibleEntity]" , englishLexicon)); BeTouchingType.setDefinition(CG.parseLF( "[State:super]-" + "-object->[TangibleEntity]" , englishLexicon)); BlockType.setDefinition(CG.parseLF( "[Obstruct:super]-" + "-resultingState->[BeBlocked]" , englishLexicon)); BreachType.setDefinition(CG.parseLF( "[Break:super]-" + "-object->[Barrier],\n" + "-result->[Portal],\n" + "-agent->[TangibleEntity]" , englishLexicon)); BreakType.setDefinition(CG.parseLF( "[Damage:super]-" + "-object->[TangibleEntity],\n" + "-theEffectedState->[BeBroken]" , englishLexicon)); CarryType.setDefinition(CG.parseLF( "[Move:super]-" + "-agent->[Object],\n" + "-object->[Object],\n" + "-subevent->[Locomotion],\n" + "-subevent->[Hold],\n" + "-causes->[Move]" , englishLexicon)); CellWallType.setDefinition(CG.parseLF( "[Enclosure:super]-" + "-location->[Place]" , englishLexicon)); ComeIntoContactType.setDefinition(CG.parseLF( "[ComeTogether:super]-" + "-object->[TangibleEntity],\n" + "-destination->[Place],\n" + "-source->[Place],\n" + "-path->[Place]" , englishLexicon)); ComeTogetherType.setDefinition(CG.parseLF( "[MoveTogether:super]-" + "-object->[TangibleEntity],\n" + "-destination->[Place],\n" + "-source->[Place],\n" + "-path->[Place]" , englishLexicon)); ConfineType.setDefinition(CG.parseLF( "[Obstruct:super]-" + "-theEnclosure->[Enclosure],\n" + "-object->[TangibleEntity],\n" + "-resultingState->[BeConfined]" , englishLexicon)); ContainerType.setDefinition(CG.parseLF( "[Enclosure:super]-" + "-shape->[HollowVolume],\n" + "-intersect->[Portal]" , englishLexicon)); CopyType.setDefinition(CG.parseLF( "[Create:super]-" + "-object->[TangibleEntity],\n" + "-instrument->[TangibleEntity],\n" + "-byMeansOf->[Event]" , englishLexicon)); CreateType.setDefinition(CG.parseLF( "[Action:super]-" + "-result->[TangibleEntity],\n" + "-agent->[LivingEntity],\n" + "-instrument->[TangibleEntity],\n" + "-byMeansOf->[Event]" , englishLexicon)); CytoplasmType.setDefinition(CG.parseLF( "[Enclosure:super]-" + "-contains->[DNA],\n" + "-contains->[RNATranscript],\n" + "-contains->[Enzyme],\n" + "-contains->[Ribosome],\n" + "-contains->[RegulatoryProtein],\n" + "-contains->[TRNA],\n" + "-contains->[Deoxyribonucleotide]" , englishLexicon)); DNAType.setDefinition(CG.parseLF( "[NucleicAcid:super]-" + "-subunit->[Deoxyribonucleotide],\n" + "-shape->[Helix],\n" + "-genes->[Gene],\n" + "-promoter->[Promoter],\n" + "-terminator->[Terminator],\n" + "-location->[Place],\n" + "-hasPart->[Deoxyribonucleotide]" , englishLexicon)); DeliverType.setDefinition(CG.parseLF( "[Receive:super]-" + "-agent->[TangibleEntity]" , englishLexicon)); DestroyType.setDefinition(CG.parseLF( "[Break:super]-" + "-object->[TangibleEntity],\n" + "-agent->[TangibleEntity],\n" + "-instrument->[TangibleEntity],\n" + "-byMeansOf->[Event]" , englishLexicon)); DispatchType.setDefinition(CG.parseLF( "[Relinquish:super]-" + "-agent->[Entity]" , englishLexicon)); DisperseType.setDefinition(CG.parseLF( "[MoveFrom:super]-" + "-source->[Place],\n" + "-destination->[Place],\n" + "-instrument->[Place],\n" + "-path->[Place]" , englishLexicon)); DonateType.setDefinition(CG.parseLF( "[Give:super]-" + "-beneficiary->[TangibleEntity]" , englishLexicon)); EjectType.setDefinition(CG.parseLF( "[MoveOutOf:super]-" + "-agent->[Enclosure],\n" + "-object->[Organism],\n" + "-causes->[Exit]" , englishLexicon)); EmitType.setDefinition(CG.parseLF( "[MoveFrom:super]-" + "-object->[FluidOrParticleOrEMWave]" , englishLexicon)); EnclosureType.setDefinition(CG.parseLF( "[Barrier:super]-location->[Place]" , englishLexicon)); EndocytoseType.setDefinition(CG.parseLF( "[TakeUp:super]-agent->[Cell]" , englishLexicon)); EucaryoteType.setDefinition(CG.parseLF( "[Organism:super]-" + "-hasPart->[Nucleus],\n" + "-hasPart->[Cytoplasm]" , englishLexicon)); EventType.setDefinition(CG.parseLF( "[Thing:super]-" + "-timeOfOccurrence->[TimeInterval],\n" + "-causes->[Object],\n" + "-timeOfExistence->[TimeInterval]" , englishLexicon)); ExcreteType.setDefinition(CG.parseLF( "[Expel:super]-object->[Waste]" , englishLexicon)); ExtrudeType.setDefinition(CG.parseLF( "[Expel:super]-" + "-agent->[TangibleEntity],\n" + "-object->[Substance]" , englishLexicon)); ExudeType.setDefinition(CG.parseLF( "[MoveOutOf:super]-" + "-agent->[Substance],\n" + "-rate->[Slowly]" , englishLexicon)); FallType.setDefinition(CG.parseLF( "[Move:super]-" + "-direction->[Direction],\n" + "-agent->[LivingEntity]" , englishLexicon)); FormType.setDefinition(CG.parseLF( "[Create:super]-" + "-result->[TangibleEntity],\n" + "-instrument->[TangibleEntity],\n" + "-byMeansOf->[Event]" , englishLexicon)); GoToType.setDefinition(CG.parseLF( "[MoveTo:super]-" + "-agent->[Organism]" , englishLexicon)); InvadeType.setDefinition(CG.parseLF( "[Enter:super]-" + "-purpose->[State],\n" + "-subevent->[Penetrate],\n" + "-subevent->[TakeControl]" , englishLexicon)); LetGoOfType.setDefinition(CG.parseLF( "[Unobstruct:super]-" + "-object->[TangibleEntity],\n" + "-agent->[LivingEntity],\n" + "-theEffectedState->[BeHeld]" , englishLexicon)); LoseType.setDefinition(CG.parseLF( "[Transfer:super]-donor->[TangibleEntity]" , englishLexicon)); MRNAType.setDefinition(CG.parseLF( "[RNATranscript:super]-" + "-lifetime->[Minute],\n" + "-hasPart->[Nucleotide],\n" + "-hasPart->[ProteinInitiatorCodon],\n" + "-hasPart->[RNATranslatedRegion],\n" + "-hasPart->[Nucleotide],\n" + "-hasPart->[ProteinStopCodon]" , englishLexicon)); MakeContactType.setDefinition(CG.parseLF( "[MoveTogether:super]-" + "-object->[TangibleEntity],\n" + "-destination->[Place],\n" + "-source->[Place],\n" + "-path->[Place]" , englishLexicon)); MoveFromType.setDefinition(CG.parseLF( "[Move:super]-" + "-object->[TangibleEntity],\n" + "-source->[Place],\n" + "-destination->[Place],\n" + "-path->[Place]" , englishLexicon)); MoveIntoType.setDefinition(CG.parseLF( "[MoveTo:super]-" + "-object->[TangibleEntity],\n" + "-theEnclosure->[Enclosure],\n" + "-destination->[Place],\n" + "-source->[Place],\n" + "-path->[Portal]" , englishLexicon)); MoveOutOfType.setDefinition(CG.parseLF( "[MoveFrom:super]-" + "-object->[TangibleEntity],\n" + "-theEnclosure->[Enclosure],\n" + "-destination->[Place],\n" + "-source->[Place],\n" + "-path->[Portal]" , englishLexicon)); MoveThroughType.setDefinition(CG.parseLF( "[Move:super]-path->[Place]" , englishLexicon)); MoveToType.setDefinition(CG.parseLF( "[MoveTo:super]-" + "-object->[TangibleEntity],\n" + "-destination->[Place],\n" + "-source->[Place],\n" + "-path->[Place]" , englishLexicon)); MoveTogetherType.setDefinition(CG.parseLF( "[MoveTo:super]-" + "-object->[TangibleEntity],\n" + "-destination->[Place],\n" + "-source->[Place],\n" + "-path->[Place]" , englishLexicon)); MoveType.setDefinition(CG.parseLF( "[Action:super]-" + "-object->[TangibleEntity],\n" + "-destination->[Place],\n" + "-source->[Place],\n" + "-path->[Place]" , englishLexicon)); NuclearEnvelopePoresType.setDefinition(CG.parseLF( "[InanimateObject:super]-location->[Place]" , englishLexicon)); ObstructType.setDefinition(CG.parseLF( "[Action :super]<-object-[Entity]-\n"+ "-agent->[LivingEntity]" , englishLexicon)); PenetrateType.setDefinition(CG.parseLF( "[Breach:super]<-object-[Barrier]" , englishLexicon)); PhagocytoseType.setDefinition(CG.parseLF( "[Endocytose:super]<-object-[ParticulateMatter]" , englishLexicon)); PinocytoseType.setDefinition(CG.parseLF( "[Endocytose:super]<-object-[SolubleSubstance]" , englishLexicon)); ReceiveType.setDefinition(CG.parseLF( "[Transfer:super]<-recipient-[TangibleEntity]" , englishLexicon)); ReleaseType.setDefinition(CG.parseLF( "[Unobstruct:super]<-theEnclosure-[Enclosure]-\n"+ "-theEffectedState->[BeConfined]-\n"+ "-object->[ TangibleEntity]" , englishLexicon)); RepairType.setDefinition(CG.parseLF( "[Restore:super]<-object-[TangibleEntity]-\n"+ "-theEffectedState->[BeBroken]" , englishLexicon)); RestrainType.setDefinition(CG.parseLF( "[Obstruct:super]<-object-[TangibleEntity]-\n"+ "-resultingState->[BeBroken]" , englishLexicon)); RuinType.setDefinition(CG.parseLF( "[Break:super]<-object-[TangibleEntity]-\n"+ "-agent->[TangibleEntity]-\n"+ "-instrumeny->[ TangibleEntity ]-\n"+ "-byMeansOf->[Event]" , englishLexicon)); ScaleType.setDefinition(CG.parseLF( "[IntangibleEntity:super]<-scale-[ScalarValue]" , englishLexicon)); SecreteType.setDefinition(CG.parseLF( "[MoveOutOf:super]<-object-[Substance]" , englishLexicon)); ShutOutType.setDefinition(CG.parseLF( "[Obstruct:super]<-theEnclosure-[Enclosure]-\n"+ "-object->[TangibleEntity]-\n"+ "-resultingState->[BeShutOut]" , englishLexicon)); SupplyType.setDefinition(CG.parseLF( "[Give:super]<-agent-[LivingEntity]-\n"+ "-enables->[Obtain]" , englishLexicon)); SupportType.setDefinition(CG.parseLF( "[Obstruct:super]<-object-[TangibleEntity]-\n"+ "-instrument->[TangibleEntity]" , englishLexicon)); TakeInType.setDefinition(CG.parseLF( "[MoveInto:super]<-object-[TangibleEntity]-\n"+ "-destination->[Place]-\n"+ "-agent->[LivingEntity]-\n"+ "-source->[Place]-\n"+ "-path->[Portal]" , englishLexicon)); TangibleEntityType.setDefinition(CG.parseLF( "[Entity:super]<-location-[Place]" , englishLexicon)); TransferType.setDefinition(CG.parseLF( "[Action:super]<-object-[TangibleEntity]-\n"+ "-donor->[TangibleEntity]" , englishLexicon)); UnblockType.setDefinition(CG.parseLF( "[Unobstruct:super]<-object-[Place]-\n"+ "-theEffectedState->[BeBlocked]" , englishLexicon)); UnobstructType.setDefinition(CG.parseLF( "[Action:super]<-object-[Entity]-\n"+ "-agent->[LivingEntity]-\n"+ "-theEffectedState->[BeObstructed]" , englishLexicon)); UnrestrainType.setDefinition(CG.parseLF( "[Unobstruct:super]<-object-[TangibleEntity]-\n"+ "-theEffectedState->[BeRestrained]" , englishLexicon)); ///////////// Situations ///////////////////////// AbsorbType.addSituation(CG.parseLF( "[Plant]<-agent-[Absorb]-object->[Water]" , englishLexicon)); BreachType.addSituation(CG.parseLF( "[Barrier]<-object-[Breach]-\n"+ "-agent->[Breacher],\n"+ "-result->[Portal]" , englishLexicon)); ComeIntoContactType.addSituation(CG.parseLF( "[Restaurant]<-destination-[ComeIntoContact]-object->[Person:jamesBond],\n"+ "-object->[Spy]" , englishLexicon)); ComeTogetherType.addSituation(CG.parseLF( "[GoalLine]<-destination-[ComeTogether]-object->[SoccerBall],\n"+ "-object->[SoccerPlayer]" , englishLexicon)); ComeTogetherType.addSituation(CG.parseLF( "[GoalLine]<-destination-[ComeTogether]-object->[Safety],\n"+ "-object->[RunningBack]" , englishLexicon)); DeliverType.addSituation(CG.parseLF( "[DeliveryGuy]<-agent-[Deliver]-donor->[Dominoes],\n"+ "-recipient->[TangibleEntity:Albert],\n"+ "-object->[Pizza]" , englishLexicon)); DisperseType.addSituation(CG.parseLF( "[Mall]<-source-[Disperse]-object->[Organism:Ken],\n"+ "-object->[Organism:Tim]" , englishLexicon)); DonateType.addSituation(CG.parseLF( "[SalvationArmy]<-recipient-[Donate]- donor->[TangibleEntity:Mary],\n"+ "-beneficiary->[SalvationArmy],\n"+ "-object->[TV]" , englishLexicon)); EjectType.addSituation(CG.parseLF( "[Pilot]<-object-[Eject]-agent->[Flighterjet]" , englishLexicon)); EmitType.addSituation(CG.parseLF( "[FluidOrParticleOrEMWave:SunLight]<-object-[Emit]-location->[Place:Sun],\n"+ "-destination->[Place:Earth]" , englishLexicon)); EnterType.addSituation(CG.parseLF( "[Enter]-agent->[Organism:John]-location->[Place:JohnsLocation],\n"+ "-theEnclosure->[House]- hasPart->[Door],\n"+ "-location->[HouseLocation]" , englishLexicon)); ExcreteType.addSituation(CG.parseLF( "[Sweat]<-object-[Excrete]-agent->[Runner]-location->[RunnerLocation]" , englishLexicon)); ExitType.addSituation(CG.parseLF( "[Exit]-agent->[Organism:John]-location->[InsideTheHouse],,\n"+ "-theEnclosure->[House]-part->[Door],\n"+ "-location->[HouseLocation]" , englishLexicon)); /* ExpelType.addSituation(CG.parseLF( "[Food]<-object-[Expel]-agent->[Enclosure :John]-hasPart->[Mouth],\n"+ "-location->[Place:JohnsLocation]" , englishLexicon));*/ ExtrudeType.addSituation(CG.parseLF( "[TangibleEntity :Lava]<-object-[Extrude]-agent->[Earth]-location->[EarthLocation]" , englishLexicon)); ExudeType.addSituation(CG.parseLF( "[EarthLocation]<-location-[Earth]<-theEnclosure-[Exude]-object->[Oil]" , englishLexicon)); FeedType.addSituation(CG.parseLF( "[Children]<-recipient-[Feed]-donor->[LivingEntity:MotherTeresa],\n"+ "-object->[Food]" , englishLexicon)); GiveType.addSituation(CG.parseLF( "[TangibleEntity:Samuel]<-recipient -[Give]-donor->[TangibleEntity:Randy],\n"+ "-object->[PurpleShirt]" , englishLexicon)); LeaveType.addSituation(CG.parseLF( "[Place:Boston]<-source-[Leave]-agent->[Organism:John],\n"+ "-destination->[Place:Austin]" , englishLexicon)); LocomotionType.addSituation(CG.parseLF( "[Place:Boston]<-source -[Locomotion]-agent->[Organism:John]-location->[Place :Boston],,\n"+ "-destination->[Place:Austin]" , englishLexicon)); LoseType.addSituation(CG.parseLF( "[Book]<-object-[Lose]-donor->[TangibleEntity:Mark]" , englishLexicon)); MakeContactType.addSituation(CG.parseLF( "[Restaurant]<-destination-[MakeContact]-object->[Person:jamesBond],\n"+ "-object->[Spy]" , englishLexicon)); MoveFromType.addSituation(CG.parseLF( "[Place:Boston]<-source-[MoveFrom]-object->[Organism:John],\n"+ "-destination->[Place:Austin]" , englishLexicon)); MoveIntoType.addSituation(CG.parseLF( "[TrojanHorse]<-object-[MoveInto]-theEnclosure->[Troy]-location->[TroyLocation]" , englishLexicon)); MoveOutOfType.addSituation(CG.parseLF( "[Book]<-object -[MoveOutOf]-agent->[Student],\n"+ " -theEnclosure->[Bag]" , englishLexicon)); MoveThroughType.addSituation(CG.parseLF( "[Place:Indiana]<- path- [MoveThrough]-object->[TangibleEntity :David]" , englishLexicon)); MoveTogetherType.addSituation(CG.parseLF( "[Midfield] <- destination- [MoveTogether]-object->[SoccerBall],\n"+ " -object->[SoccerPlayer]" , englishLexicon)); MoveType.addSituation(CG.parseLF( "[Place:Boston]<- source -[Move] -destination->[Place:Austin],\n"+ " -object<-[TangibleEntity:John]-location->[Place:Boston]" , englishLexicon)); PenetrateType.addSituation(CG.parseLF( "[AgentPenetrate]<-attr-[Penetrate]-object->[Enclosure]-result->[Portal]" , englishLexicon)); ReceiveType.addSituation(CG.parseLF( "[Maple]<-recipient-[Receive]-agent->[Present]" , englishLexicon)); RelinquishType.addSituation(CG.parseLF( "[TangibleEntity:Bill]<-agent-[Relinquish]-object->[Gold]" , englishLexicon)); RuinType.addSituation(CG.parseLF( "[House]<-object-[Ruin]" , englishLexicon)); SecreteType.addSituation(CG.parseLF( "[Tree]<-theEnclosure-[Secrete]-object->[Sap]" , englishLexicon)); SendType.addSituation(CG.parseLF( "[TangibleEntity:Victor]<-agent-[Send]-recipient->[TangibleEntity:Maurice]-object->[BluePackage]" , englishLexicon)); SupplyType.addSituation(CG.parseLF( "[TangibleEntity:Fred]<-agent-[Supply]-recipient->[TangibleEntity:Maurice]-object->[Money]" , englishLexicon)); TakeInType.addSituation(CG.parseLF( "[Organism:John]<-agent-[TakeIn]-theEnclosure->[Lungs]-object->[Air]-path->[Nose]" , englishLexicon)); TakeUpType.addSituation(CG.parseLF( "[Cell]<-agent-[TakeUp]-object->[Food]" , englishLexicon)); TakeType.addSituation(CG.parseLF( "[FredInTake]<-agent-[Take]-donor->[JohnInTake]-object->[BookTaken]" , englishLexicon)); TransferType.addSituation(CG.parseLF( "[Place:Russia]<-donor-[Transfer]-recipient->[Place:US]-object->[Place:Alaska]" , englishLexicon)); UpTakeType.addSituation(CG.parseLF( "[Cell]<-agent-[UpTake]-object->[Food]" , englishLexicon)); // Save the new created Lexicons/Ontology in the .ont and in .xml forms // in aminePlatform.samples.ontology. try { // Save the Lexicon/Ontology, by serialisation of Java object(s), in the specified file. ontology.store(AmineFrame.ontologyDirPath + "KMOntology.ont"); // Save the Lexicon/Ontology in the specified XML file. ontology.storeInXML(AmineFrame.ontologyDirPath + "KMOntology.xml"); } catch (Exception ex){ ex.printStackTrace(); } /************ // Visualize the Ontology (Optional) TextualDisplayOntology txtDsplyOntFrm = new TextualDisplayOntology(ontology); txtDsplyOntFrm.displayOntology(); txtDsplyOntFrm.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(-1); } }); **************/ } catch (Exception ex) { System.out.println(ex.getMessage()); ex.printStackTrace(); } } }