Skip to content

Commit

Permalink
Prepared for 0.0.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinho Choi committed Apr 12, 2018
1 parent 27b3b0a commit 52d86e0
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 23 deletions.
4 changes: 2 additions & 2 deletions elit-component/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>cloud.elit</groupId>
<artifactId>elit</artifactId>
<version>0.0.3-SNAPSHOT</version>
<version>0.0.2-SNAPSHOT</version>
</parent>

<dependencies>
Expand All @@ -20,7 +20,7 @@
<dependency>
<groupId>cloud.elit</groupId>
<artifactId>elit-sdk</artifactId>
<version>0.0.3-SNAPSHOT</version>
<version>0.0.2-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
2 changes: 1 addition & 1 deletion elit-sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>cloud.elit</groupId>
<artifactId>elit</artifactId>
<version>0.0.3-SNAPSHOT</version>
<version>0.0.2-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
3 changes: 0 additions & 3 deletions elit-sdk/src/main/java/cloud/elit/sdk/DecodeComponent.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@

/**
* This abstract class is inherited by components used for decoding, but not for training.
* @param <I>
* @param <O>
* @param <P>
*/
public abstract class DecodeComponent<I, O, P extends Parameters> extends Component<I, O, P> {
/** {@inheritDoc} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,22 @@ public AbstractNode(int token_id, String token, String lemma, String syn_tag, St

// =================================== Abstract ===================================

/** @return this node. */
/**
* @return this node.
*/
public abstract N self();

/** @return the index of the child. */
/**
* @param node
* @return the index of the child.
*/
public abstract int getChildIndex(N node);

/** @return the default index for add. */
/**
* @param list
* @param node
* @return the default index for add.
*/
protected abstract int getDefaultIndex(List<N> list, N node);

// =================================== Fields ===================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ public void setEndOffset(int offset) {

// ============================== Primary Dependencies ==============================

/** {@link #isChildOf(NLPNode, String)} && {@link #isDependencyLabel(String)}. */
public boolean isChildOf(NLPNode node, String label) {
return isChildOf(node) && isDependencyLabel(label);
}
Expand Down Expand Up @@ -237,24 +236,24 @@ public String getValency() {
}

/**
* @return "<" if there is only one child oNLPNode the left-hand side,
* "<<" if there are more thaNLPNode one child oNLPNode the left-hand side,
* @return "[" if there is only one child oNLPNode the left-hand side,
* "[[" if there are more thaNLPNode one child oNLPNode the left-hand side,
* null if there is no child oNLPNode the left-hand side.
*/
public String getLeftValency() {
if (getLeftMostChild(1) != null) return "<<";
if (getLeftMostChild() != null) return "<";
if (getLeftMostChild(1) != null) return "[[";
if (getLeftMostChild() != null) return "[";
return null;
}

/**
* @return ">" if there is only one child oNLPNode the right-hand side,
* "<<" if there are more thaNLPNode one child oNLPNode the right-hand side,
* @return "]" if there is only one child oNLPNode the right-hand side,
* "]]" if there are more thaNLPNode one child oNLPNode the right-hand side,
* null if there is no child oNLPNode the right-hand side.
*/
public String getRightValency() {
if (getRightMostChild(1) != null) return ">>";
if (getRightMostChild() != null) return ">";
if (getRightMostChild(1) != null) return "]]";
if (getRightMostChild() != null) return "]";
return null;
}

Expand Down
8 changes: 4 additions & 4 deletions elit-sdk/src/main/java/cloud/elit/sdk/util/DSUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static public <N>N getLast(List<N> list) {
}

/**
* e.g., getFirst(list, "VB", (n,s) -> AbstractNode::isSyntacticTag);
* e.g., getFirst(list, "VB", (n,s) - AbstractNode::isSyntacticTag);
* @param matcher takes a node and the supplement, and returns true if its field matches to the specific predicate.
* @return the first item in the list matching the condition if exists; otherwise, {@code null}.
*/
Expand All @@ -41,7 +41,7 @@ static public <N>N getFirst(List<N> list, Predicate<N> matcher)
}

/**
* e.g., getLast(list, "VB", (n,s) -> AbstractNode::isSyntacticTag);
* e.g., getLast(list, "VB", (n,s) - AbstractNode::isSyntacticTag);
* @param matcher takes a node and the supplement, and returns true if its field matches to the specific predicate.
* @return the last node in the list matching the condition.
*/
Expand All @@ -51,7 +51,7 @@ static public <N>N getLast(List<N> list, Predicate<N> matcher)
}

/**
* e.g., getMatchedList(list, "VB", (n,s) -> AbstractNode::isSyntacticTag);
* e.g., getMatchedList(list, "VB", (n,s) - AbstractNode::isSyntacticTag);
* @param matcher takes a node and the supplement, and returns true if its field matches to the specific predicate.
* @return the sublist of the original list containing only matched items.
*/
Expand All @@ -61,7 +61,7 @@ static public <N>List<N> getMatchedList(List<N> list, Predicate<N> matcher)
}

/**
* e.g., contains(list, "VB", (n,s) -> AbstractNode::isSyntacticTag);
* e.g., contains(list, "VB", (n,s) - AbstractNode::isSyntacticTag);
* @param matcher takes a node and the supplement, and returns true if its field matches to the specific predicate.
* @return true if the list contains any item matching the condition.
*/
Expand Down
10 changes: 9 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>cloud.elit</groupId>
<artifactId>elit</artifactId>
<version>0.0.3-SNAPSHOT</version>
<version>0.0.2-SNAPSHOT</version>
<packaging>pom</packaging>

<name>ELIT: Evolution of Language and Information Technology</name>
Expand Down Expand Up @@ -97,6 +97,14 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down

0 comments on commit 52d86e0

Please sign in to comment.