|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectes.upv.dsic.gti_ia.argAgents.argCBR.ArgCBR
public class ArgCBR
This class implements the argumentation CBR. This CBR stores argument-cases that represent past argumentation experiences and their final outcome.
| Constructor Summary | |
|---|---|
ArgCBR(String initialDataFilePath,
String storingDataFilePath)
Constructor that initializes the ArgCBR creating the HashMap structure and loading the argument-cases stored in the indicated path. |
|
| Method Summary | |
|---|---|
boolean |
addCase(ArgumentCase newArgCase)
Adds a new argument-case to the case-base. |
void |
doCache()
Stores the argument-case case-base in the file path specified in the creation of the class |
void |
doCache(String fileName)
Stores the argument-case case-base in the file path specified as argument |
void |
doCacheInc()
Stores the argument-case case-base in the file path specified in the creation of the class, but keeping all previous information of that file |
Collection<ArrayList<ArgumentCase>> |
getAllCases()
Returns all argument-cases in a Collection |
Vector<ArgumentCase> |
getAllCasesVector()
Returns all argument-cases in a Vector |
ArrayList<Float> |
getAttackDegree(ArrayList<SimilarArgumentCase> sameProblemAcceptedArgCases,
ArrayList<Position> initialPositions)
Returns the attack degree of each given Position |
ArrayList<Float> |
getDegrees(ArgumentProblem argProblem,
Solution solution,
ArrayList<Position> allPositions,
int index)
Return a list with the degrees (attack, efficiency, explanatory power, persuasiveness, support and risk) of an argument-case |
ArrayList<Float> |
getEfficiencyDegree(ArrayList<SimilarArgumentCase> sameProblemAcceptedArgCases,
ArrayList<Position> initialPositions)
Returns the efficiency degree of each initial position |
ArrayList<Float> |
getExplanatoryPower(ArrayList<SimilarArgumentCase> sameProblemAcceptedArgCases,
ArrayList<Position> initialPositions)
Returns the explanatory power of the given positions |
ArrayList<SimilarArgumentCase> |
getMostSimilarArgCases(ArgumentProblem argProblem)
Get the argument-cases with the same domain context as the given argument-case and the same dependency relation. |
ArrayList<SimilarArgumentCase> |
getSameDomainAndSocialContextAccepted(HashMap<Integer,Premise> premises,
Solution solution,
SocialContext socialContext)
Returns the argument-cases with the same domain and social context that have been accepted in teh past |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArgCBR(String initialDataFilePath,
String storingDataFilePath)
initialDataFilePath - Path of the data file with the argument-cases to loadstoringDataFilePath - Path of the data file to store the argument-cases| Method Detail |
|---|
public boolean addCase(ArgumentCase newArgCase)
newArgCase - A new argument-case to add to the case-base.
true if the argument-case is added, otherwise false.
public ArrayList<Float> getDegrees(ArgumentProblem argProblem,
Solution solution,
ArrayList<Position> allPositions,
int index)
argProblem - Problem to solvesolution - Solution that proposes the argument-caseallPositions - Positions to calculate the degrees of the argument-caseindex - Index of the position that represents the argument-case which the degrees are being calculated
public ArrayList<Float> getAttackDegree(ArrayList<SimilarArgumentCase> sameProblemAcceptedArgCases,
ArrayList<Position> initialPositions)
Position
sameProblemAcceptedArgCases - argument-cases with the same problem description and that were acceptedinitialPositions - ArrayList with different positions, but with the same problem description
ArrayList of Float with the attack degree of each initial position
public ArrayList<Float> getEfficiencyDegree(ArrayList<SimilarArgumentCase> sameProblemAcceptedArgCases,
ArrayList<Position> initialPositions)
sameProblemAcceptedArgCases - argument-cases with the same problem description and that were acceptedinitialPositions - ArrayList with different positions, but with the same problem description
ArrayList of Float with the efficiency degree of each initial position
public ArrayList<Float> getExplanatoryPower(ArrayList<SimilarArgumentCase> sameProblemAcceptedArgCases,
ArrayList<Position> initialPositions)
sameProblemAcceptedArgCases - argument-cases with the same problem description and that were acceptedinitialPositions - ArrayList with different positions, but with the same problem description
ArrayList of Float with the explanatory power of each initial position
public ArrayList<SimilarArgumentCase> getSameDomainAndSocialContextAccepted(HashMap<Integer,Premise> premises,
Solution solution,
SocialContext socialContext)
premises - HashMap of the premises that describe the domain contextsolution - Solution of the problemsocialContext - SocialContext of the current situation
public ArrayList<SimilarArgumentCase> getMostSimilarArgCases(ArgumentProblem argProblem)
argProblem - The argument problem with a specific domain context and social context that the returned argument-cases have to be similar
ArrayList of SimilarArgumentCase that have the same domain context as the given argument-case and the same dependency relation, weighted with a suitability degreepublic Collection<ArrayList<ArgumentCase>> getAllCases()
Collection
Collectionpublic Vector<ArgumentCase> getAllCasesVector()
Vector
Vectorpublic void doCache()
public void doCache(String fileName)
fileName - File path to store the case-basepublic void doCacheInc()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||