Skip to content

Commit

Permalink
Catalog添加toString方法
Browse files Browse the repository at this point in the history
  • Loading branch information
hankcs committed Jan 4, 2019
1 parent 455f593 commit d72b789
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/com/hankcs/hanlp/classification/corpus/Catalog.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ public String getCategory(int id)
return idCategory.get(id);
}

public List<String> getCategories()
{
return idCategory;
}

public int size()
{
return idCategory.size();
Expand All @@ -81,4 +86,10 @@ public String[] toArray()

return catalog;
}

@Override
public String toString()
{
return idCategory.toString();
}
}

0 comments on commit d72b789

Please sign in to comment.