Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

70 show previously extracted arguments #71

Merged
merged 4 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ARGAEL: ARGument Annotation and Evaluation tooL
![version](https://img.shields.io/badge/version-1.1-blue)
![last-update](https://img.shields.io/badge/last_update-10/12/2023-orange)
![version](https://img.shields.io/badge/version-1.2-blue)
![last-update](https://img.shields.io/badge/last_update-01/08/2024-orange)
![license](https://img.shields.io/badge/license-Apache_2.0-brightgreen)

**ARGAEL** is an open-source Java desktop application designed to provide flexibility and efficiency on the manual labeling and assessing of argumentative information at scale.
Expand Down
991 changes: 991 additions & 0 deletions data/arguments/arguments.csv

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

| Nr. | Code metadata description | Value |
| --- | --- | --- |
| C1 | Current code version | v1.1 |
| C1 | Current code version | v1.2 |
| C2 | Permanent link to code/repository used for this code version | https://github.com/argrecsys/argael |
| C3 | Permanent link to Reproducible Capsule | https://github.com/argrecsys/argael/tree/main/exec |
| C4 | Legal Code License | Apache License 2.0 |
Expand All @@ -16,7 +16,7 @@

## All Dependencies
The implemented solution depends on or make use of the following libraries:
- JDK 17
- <a href="https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html" target="_blank">JDK 17</a>
- JSON Java 20210307
- OpenCSV 4.1
- Snake YAML 1.9
Expand Down
81 changes: 81 additions & 0 deletions src/Argael/src/es/uam/irg/data/ArgumentNode.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/**
* Copyright 2024
* Andrés Segura-Tinoco
* Information Retrieval Group at Universidad Autonoma de Madrid
*
* This is free software: you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* This software 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* the current software. If not, see <http://www.gnu.org/licenses/>.
*/
package es.uam.irg.data;

/**
*
* @author asegura
*/
public class ArgumentNode {

private int argumentId;
private int proposalId;
private String aspectName;
private String aspectDescription;
private String argumentType;
private String argument;

public ArgumentNode(int argumentId, int proposalId, String aspectName, String aspectDesc, String argumentType, String argument) {
this.argumentId = argumentId;
this.proposalId = proposalId;
this.aspectName = aspectName;
this.aspectDescription = aspectDesc;
this.argumentType = argumentType;
this.argument = argument;
}

public ArgumentNode(String[] data) {
if (data.length == 6) {
this.argumentId = Integer.parseInt(data[0]);
this.proposalId = Integer.parseInt(data[1]);
this.aspectName = data[2];
this.aspectDescription = data[3];
this.argumentType = data[4];
this.argument = data[5];
}
}

public int getArgumentId() {
return argumentId;
}

public String getArgument() {
return argument;
}

public String getAspectName() {
return aspectName;
}

public String getAspectDesc() {
return aspectDescription;
}

public String getArgumentType() {
return argumentType;
}

public int getProposalId() {
return proposalId;
}

public String getProposalIdString() {
return Integer.toString(proposalId);
}

}
12 changes: 12 additions & 0 deletions src/Argael/src/es/uam/irg/data/DataManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package es.uam.irg.data;

import es.uam.irg.io.IOManager;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

Expand Down Expand Up @@ -55,6 +56,17 @@ public DataManager(String server, String instance, String user, String pwd) {
this.type = DataType.DATABASE;
}

public List<ArgumentNode> getLlmArguments(String currEntity) {
String filePath = directory + "/../arguments/arguments.csv";
Map<String, List<ArgumentNode>> argumentList = IOManager.readLlmArguments(filePath);
List<ArgumentNode> arguments = new ArrayList<>();
if (argumentList.containsKey(currEntity)) {
arguments = argumentList.get(currEntity);
}

return arguments;
}

/**
*
* @param entity
Expand Down
49 changes: 49 additions & 0 deletions src/Argael/src/es/uam/irg/gui/ArgaelForm.form
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,55 @@
</Container>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="pnlArgumentTree">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
<JTabbedPaneConstraints tabName="Argument Tree">
<Property name="tabTitle" type="java.lang.String" value="Argument Tree"/>
</JTabbedPaneConstraints>
</Constraint>
</Constraints>

<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="scrollPane14" pref="1513" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace pref="43" max="32767" attributes="0"/>
<Component id="scrollPane14" min="-2" pref="661" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Container class="javax.swing.JScrollPane" name="scrollPane14">
<AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
</AuxValues>

<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Component class="javax.swing.JEditorPane" name="edtArgumentTree">
<Properties>
<Property name="editable" type="boolean" value="false"/>
<Property name="contentType" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="HTML_CONTENT_TYPE" type="code"/>
</Property>
</Properties>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Container>
</SubComponents>
</Container>
</SubComponents>
Expand Down
Loading