您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

word.js 848B

12345678910111213141516171819202122232425262728293031323334353637
  1. /**
  2. * An object representing a transcribed word, with some additional information
  3. * @param word the word
  4. * @param begin the time the word was started being uttered
  5. * @param end the time the word stopped being uttered
  6. */
  7. const Word = function(word, begin, end) {
  8. this.word = word;
  9. this.begin = begin;
  10. this.end = end;
  11. };
  12. /**
  13. * Get the string representation of the word
  14. * @returns {*} the word as a string
  15. */
  16. Word.prototype.getWord = function() {
  17. return this.word;
  18. };
  19. /**
  20. * Get the time the word started being uttered
  21. * @returns {*} the start time as an integer
  22. */
  23. Word.prototype.getBeginTime = function() {
  24. return this.begin;
  25. };
  26. /**
  27. * Get the time the word stopped being uttered
  28. * @returns {*} the end time as an integer
  29. */
  30. Word.prototype.getEndTime = function() {
  31. return this.end;
  32. };
  33. module.exports = Word;