Package groundTruthModule.datastructure.PersonEntity

Examples of groundTruthModule.datastructure.PersonEntity.Quantity


        evidence.setResidentNode("knowsPersonImprisionedInOIForOEF");
        argument = new ArgumentInfo();
        argument.setType("Person");
        argument.setName(personName);
        evidence.getArguments().add(argument);
        Quantity quantity = person.getKnowsPersonImprisionedInOIForOEF();
        evidence.setState(quantity.toString());
        evidenceList.add(evidence);
      }
      if (person.getKnowsPersonKilledinOIForOEF() != null) {
        evidence = new EvidenceInfo();
        evidence.setResidentNode("knowsPersonKilledInOIForOEF");
        argument = new ArgumentInfo();
        argument.setType("Person");
        argument.setName(personName);
        evidence.getArguments().add(argument);
        Quantity quantity = person.getKnowsPersonKilledinOIForOEF();
        evidence.setState(quantity.toString());
        evidenceList.add(evidence);
      }
      if (person.getHasFamilyStatus() != null) {
        evidence = new EvidenceInfo();
        evidence.setResidentNode("hasFamilyStatus");
        argument = new ArgumentInfo();
        argument.setType("Person");
        argument.setName(personName);
        evidence.getArguments().add(argument);
        FamilyStatus status = person.getHasFamilyStatus();
        evidence.setState(status.toString());
        evidenceList.add(evidence);
      }
     
      // Evidence that support the hypothesis hasTerroristBeliefs(person)
      if (person.getHasFriendshipWithTerrorist() != null) {
        evidence = new EvidenceInfo();
        evidence.setResidentNode("hasFriendshipWithTerrorist");
        argument = new ArgumentInfo();
        argument.setType("Person");
        argument.setName(personName);
        evidence.getArguments().add(argument);
        Quantity quantity = person.getHasFriendshipWithTerrorist();
        evidence.setState(quantity.toString());
        evidenceList.add(evidence);
      }
      if (person.getHasKinshipToTerrorist() != null) {
        evidence = new EvidenceInfo();
        evidence.setResidentNode("hasKinshipToTerrorist");
        argument = new ArgumentInfo();
        argument.setType("Person");
        argument.setName(personName);
        evidence.getArguments().add(argument);
        Quantity quantity = person.getHasKinshipToTerrorist();
        evidence.setState(quantity.toString());
        evidenceList.add(evidence);
      }
     
      // Evidence that support the hypothesis hasClusterPartition(person)
      if (person.getHasNationality() != null) {
View Full Code Here


      if (person.getKnowsPersonImprisionedInOIForOEF() != null) {
        residentNode = mebn.getDomainResidentNode("knowsPersonImprisionedInOIForOEF");
        arguments = new ObjectEntityInstance[1];
        arguments[0] = mebn.getObjectEntityContainer()
            .getEntityInstanceByName(personName);
        Quantity quantity = person.getKnowsPersonImprisionedInOIForOEF();
        if (quantity == Quantity.None) {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("None");
        } else if (quantity == Quantity.Few) {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("Few");
        } else {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("Many");
        }
        mebnUtil
            .createRandomVariableFinding(residentNode, arguments, categoricalState);
      }
      if (person.getKnowsPersonKilledinOIForOEF() != null) {
        residentNode = mebn.getDomainResidentNode("knowsPersonKilledInOIForOEF");
        arguments = new ObjectEntityInstance[1];
        arguments[0] = mebn.getObjectEntityContainer()
            .getEntityInstanceByName(personName);
        Quantity quantity = person.getKnowsPersonKilledinOIForOEF();
        if (quantity == Quantity.None) {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("None");
        } else if (quantity == Quantity.Few) {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("Few");
        } else {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("Many");
        }
        mebnUtil
            .createRandomVariableFinding(residentNode, arguments, categoricalState);
      }
      if (person.getHasFamilyStatus() != null) {
        residentNode = mebn.getDomainResidentNode("hasFamilyStatus");
        arguments = new ObjectEntityInstance[1];
        arguments[0] = mebn.getObjectEntityContainer()
            .getEntityInstanceByName(personName);
        FamilyStatus status = person.getHasFamilyStatus();
        if (status == FamilyStatus.Single) {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("Single");
        } else {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("Married");
        }
        mebnUtil
            .createRandomVariableFinding(residentNode, arguments, categoricalState);
      }
     
      // Evidence that support the hypothesis hasTerroristBeliefs(person)
      if (person.getHasFriendshipWithTerrorist() != null) {
        residentNode = mebn.getDomainResidentNode("hasFriendshipWithTerrorist");
        arguments = new ObjectEntityInstance[1];
        arguments[0] = mebn.getObjectEntityContainer()
            .getEntityInstanceByName(personName);
        Quantity quantity = person.getHasFriendshipWithTerrorist();
        if (quantity == Quantity.None) {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("None");
        } else if (quantity == Quantity.Few) {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("Few");
        } else {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("Many");
        }
        mebnUtil
            .createRandomVariableFinding(residentNode, arguments, categoricalState);
      }
      if (person.getHasKinshipToTerrorist() != null) {
        residentNode = mebn.getDomainResidentNode("hasKinshipToTerrorist");
        arguments = new ObjectEntityInstance[1];
        arguments[0] = mebn.getObjectEntityContainer()
            .getEntityInstanceByName(personName);
        Quantity quantity = person.getHasKinshipToTerrorist();
        if (quantity == Quantity.None) {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("None");
        } else if (quantity == Quantity.Few) {
          categoricalState = mebn.getCategoricalStatesEntityContainer().getCategoricalState("Few");
        } else {
View Full Code Here

TOP

Related Classes of groundTruthModule.datastructure.PersonEntity.Quantity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.