Skip to content

Commit

Permalink
#71 - Upgrade to DKPro Core 1.11.0
Browse files Browse the repository at this point in the history
- Formatting
- Fixed dependencies
  • Loading branch information
reckart committed Jul 13, 2019
1 parent 0d54bda commit 9cd6bd2
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,24 @@
import de.tudarmstadt.ukp.dkpro.lexsemresource.exception.LexicalSemanticResourceException;

public final class JiangConrathRelatednessResource
extends LSRRelatednessResourceBase
extends LSRRelatednessResourceBase
{

@SuppressWarnings({ "rawtypes" })
@Override
public boolean initialize(ResourceSpecifier aSpecifier, Map aAdditionalParams)
throws ResourceInitializationException
{
if (!super.initialize(aSpecifier, aAdditionalParams)) {
return false;
}
public boolean initialize(ResourceSpecifier aSpecifier, Map aAdditionalParams)
throws ResourceInitializationException
{
if (!super.initialize(aSpecifier, aAdditionalParams)) {
return false;
}

try {
try {
measure = new JiangConrathComparator(lsr);
}
catch (LexicalSemanticResourceException e) {
throw new ResourceInitializationException(e);
}

return true;
}
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,37 +34,36 @@
*
*/
public abstract class LSRRelatednessResourceBase
extends TextSimilarityResourceBase
extends TextSimilarityResourceBase
{

// Attention! Can only have String parameters in external resources.

public static final String PARAM_RESOURCE_NAME = "LsrResourceName";
@ConfigurationParameter(name = PARAM_RESOURCE_NAME, mandatory = true)
protected String lsrResourceName;

public static final String PARAM_RESOURCE_LANGUAGE = "LSRResourceLanguage";
@ConfigurationParameter(name = PARAM_RESOURCE_LANGUAGE, mandatory = true)
protected String lsrResourceLanguage;

protected LexicalSemanticResource lsr;

@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public boolean initialize(ResourceSpecifier aSpecifier, Map aAdditionalParams)
throws ResourceInitializationException
{
if (!super.initialize(aSpecifier, aAdditionalParams)) {
return false;
}
public boolean initialize(ResourceSpecifier aSpecifier, Map aAdditionalParams)
throws ResourceInitializationException
{
if (!super.initialize(aSpecifier, aAdditionalParams)) {
return false;
}

try {
try {
lsr = ResourceFactory.getInstance().get(lsrResourceName, lsrResourceLanguage);
}
catch (ResourceLoaderException e) {
throw new ResourceInitializationException(e);
}

return true;
}
return true;
}
}
4 changes: 4 additions & 0 deletions dkpro-similarity-experiments-wordchoice-asl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
<groupId>org.dkpro.core</groupId>
<artifactId>dkpro-core-io-text-asl</artifactId>
</dependency>
<dependency>
<groupId>org.dkpro.similarity</groupId>
<artifactId>dkpro-similarity-uima-core-asl</artifactId>
</dependency>
<dependency>
<groupId>org.dkpro.similarity</groupId>
<artifactId>dkpro-similarity-algorithms-api-asl</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions dkpro-similarity-experiments-wordpairs-asl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@
<groupId>org.dkpro.core</groupId>
<artifactId>dkpro-core-io-text-asl</artifactId>
</dependency>
<dependency>
<groupId>org.dkpro.similarity</groupId>
<artifactId>dkpro-similarity-uima-core-asl</artifactId>
</dependency>
<dependency>
<groupId>org.dkpro.similarity</groupId>
<artifactId>dkpro-similarity-algorithms-api-asl</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.dkpro</groupId>
<artifactId>dkpro-parent-pom</artifactId>
<version>19</version>
<version>22</version>
</parent>
<groupId>org.dkpro.similarity</groupId>
<artifactId>dkpro-similarity</artifactId>
Expand Down

0 comments on commit 9cd6bd2

Please sign in to comment.