You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

word.js 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. export default class Word {
  8. /**
  9. * @param word the word
  10. * @param begin the time the word was started being uttered
  11. * @param end the time the word stopped being uttered
  12. */
  13. constructor(word, begin, end) {
  14. this.word = word;
  15. this.begin = begin;
  16. this.end = end;
  17. }
  18. /**
  19. * Get the string representation of the word
  20. * @returns {*} the word as a string
  21. */
  22. getWord() {
  23. return this.word;
  24. }
  25. /**
  26. * Get the time the word started being uttered
  27. * @returns {*} the start time as an integer
  28. */
  29. getBeginTime() {
  30. return this.begin;
  31. }
  32. /**
  33. * Get the time the word stopped being uttered
  34. * @returns {*} the end time as an integer
  35. */
  36. getEndTime() {
  37. return this.end;
  38. }
  39. }