/ictclas4j/src/org/ictclas4j/bean/Pronun.java

http://ictclas4j.googlecode.com/ · Java · 49 lines · 31 code · 12 blank · 6 comment · 2 complexity · d1041db8d4a90c88690b12c6c3c2f520 MD5 · raw file

  1. package org.ictclas4j.bean;
  2. import java.util.ArrayList;
  3. /**
  4. * GBK??????????????????????????
  5. *
  6. * @author sinboy
  7. *
  8. */
  9. public class Pronun {
  10. private String word;//??
  11. private String pronun;//??
  12. private ArrayList<Integer> homophonyList;//???????
  13. public String getGbkID() {
  14. return word;
  15. }
  16. public void setWord(String word) {
  17. this.word = word;
  18. }
  19. public ArrayList<Integer> getHomophonyList() {
  20. return homophonyList;
  21. }
  22. public void setHomophonyList(ArrayList<Integer> homophonyList) {
  23. this.homophonyList = homophonyList;
  24. }
  25. public String getPronun() {
  26. return pronun;
  27. }
  28. public void setPronun(String pronun) {
  29. this.pronun = pronun;
  30. }
  31. public void addHomophony(int index){
  32. if(homophonyList==null)
  33. homophonyList=new ArrayList<Integer>();
  34. if(!homophonyList.contains(index))
  35. homophonyList.add(index);
  36. }
  37. }