TextGrid.h 6.9 KB

  1. #ifndef _TextGrid_h_
  2. #define _TextGrid_h_
  3. /* TextGrid.h
  4. *
  5. * Copyright (C) 1992-2012,2014,2015,2017 Paul Boersma
  6. *
  7. * This code is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * This code is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * See the GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this work. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. #include "AnyTier.h"
  21. #include "Label.h"
  22. #include "Graphics.h"
  23. #include "TableOfReal.h"
  24. #include "Table.h"
  25. Collection_define (FunctionList, OrderedOf, Function) {
  26. };
  27. #include "TextGrid_def.h"
  28. autoTextPoint TextPoint_create (double time, conststring32 mark);
  29. void TextPoint_setText (TextPoint me, conststring32 text);
  30. autoTextInterval TextInterval_create (double tmin, double tmax, conststring32 text);
  31. void TextInterval_setText (TextInterval me, conststring32 text);
  32. autoTextTier TextTier_create (double tmin, double tmax);
  33. void TextTier_addPoint (TextTier me, double time, conststring32 mark);
  34. autoTextTier TextTier_readFromXwaves (MelderFile file);
  35. autoPointProcess TextTier_getPoints (TextTier me, conststring32 text);
  36. autoIntervalTier IntervalTier_create (double tmin, double tmax);
  37. autoIntervalTier IntervalTier_readFromXwaves (MelderFile file);
  38. void IntervalTier_writeToXwaves (IntervalTier me, MelderFile file);
  39. integer IntervalTier_timeToLowIndex (IntervalTier me, double t);
  40. integer IntervalTier_timeToIndex (IntervalTier me, double t); // obsolete
  41. integer IntervalTier_timeToHighIndex (IntervalTier me, double t);
  42. integer IntervalTier_hasTime (IntervalTier me, double t);
  43. integer IntervalTier_hasBoundary (IntervalTier me, double t);
  44. autoPointProcess IntervalTier_getStartingPoints (IntervalTier me, conststring32 text);
  45. autoPointProcess IntervalTier_getEndPoints (IntervalTier me, conststring32 text);
  46. autoPointProcess IntervalTier_getCentrePoints (IntervalTier me, conststring32 text);
  47. autoPointProcess IntervalTier_PointProcess_startToCentre (IntervalTier tier, PointProcess point, double phase);
  48. autoPointProcess IntervalTier_PointProcess_endToCentre (IntervalTier tier, PointProcess point, double phase);
  49. void IntervalTier_removeLeftBoundary (IntervalTier me, integer intervalNumber);
  50. void TextTier_removePoint (TextTier me, integer pointNumber);
  51. autoTextGrid TextGrid_createWithoutTiers (double tmin, double tmax);
  52. autoTextGrid TextGrid_create (double tmin, double tmax, conststring32 tierNames, conststring32 pointTiers);
  53. integer TextGrid_countLabels (TextGrid me, integer itier, conststring32 text);
  54. integer TextGrid_countIntervalsWhere (TextGrid me, integer tierNumber, kMelder_string which, conststring32 criterion);
  55. integer TextGrid_countPointsWhere (TextGrid me, integer tierNumber, kMelder_string which, conststring32 criterion);
  56. autoPointProcess TextGrid_getStartingPoints (TextGrid me, integer tierNumber, kMelder_string which, conststring32 criterion);
  57. autoPointProcess TextGrid_getEndPoints (TextGrid me, integer tierNumber, kMelder_string which, conststring32 criterion);
  58. autoPointProcess TextGrid_getCentrePoints (TextGrid me, integer tierNumber, kMelder_string which, conststring32 criterion);
  59. autoPointProcess TextGrid_getPoints (TextGrid me, integer tierNumber, kMelder_string which, conststring32 criterion);
  60. autoPointProcess TextGrid_getPoints_preceded (TextGrid me, integer tierNumber,
  61. kMelder_string which, conststring32 criterion,
  62. kMelder_string precededBy, conststring32 criterion_precededBy);
  63. autoPointProcess TextGrid_getPoints_followed (TextGrid me, integer tierNumber,
  64. kMelder_string which, conststring32 criterion,
  65. kMelder_string followedBy, conststring32 criterion_followedBy);
  66. Function TextGrid_checkSpecifiedTierNumberWithinRange (TextGrid me, integer tierNumber);
  67. IntervalTier TextGrid_checkSpecifiedTierIsIntervalTier (TextGrid me, integer tierNumber);
  68. TextTier TextGrid_checkSpecifiedTierIsPointTier (TextGrid me, integer tierNumber);
  69. void TextGrid_addTier_copy (TextGrid me, Function tier);
  70. autoTextGrid TextGrids_merge (OrderedOf<structTextGrid>* textGrids);
  71. autoTextGrid TextGrid_extractPart (TextGrid me, double tmin, double tmax, bool preserveTimes);
  72. autoTextGrid Label_to_TextGrid (Label me, double duration);
  73. autoTextGrid Label_Function_to_TextGrid (Label me, Function function);
  74. autoTextTier PointProcess_upto_TextTier (PointProcess me, conststring32 text);
  75. autoTableOfReal IntervalTier_downto_TableOfReal (IntervalTier me, conststring32 label);
  76. autoTableOfReal IntervalTier_downto_TableOfReal_any (IntervalTier me);
  77. autoTableOfReal TextTier_downto_TableOfReal (TextTier me, conststring32 label);
  78. autoTableOfReal TextTier_downto_TableOfReal_any (TextTier me);
  79. autoTextGrid PointProcess_to_TextGrid_vuv (PointProcess me, double maxT, double meanT);
  80. integer TextInterval_labelLength (TextInterval me);
  81. integer TextPoint_labelLength (TextPoint me);
  82. integer IntervalTier_maximumLabelLength (IntervalTier me);
  83. integer TextTier_maximumLabelLength (TextTier me);
  84. integer TextGrid_maximumLabelLength (TextGrid me);
  85. void TextGrid_convertToBackslashTrigraphs (TextGrid me);
  86. void TextGrid_convertToUnicode (TextGrid me);
  87. void TextInterval_removeText (TextInterval me);
  88. void TextPoint_removeText (TextPoint me);
  89. void IntervalTier_removeText (IntervalTier me);
  90. void TextTier_removeText (TextTier me);
  91. void TextTier_removePoints (TextTier me, kMelder_string which, conststring32 criterion);
  92. void TextGrid_removePoints (TextGrid me, integer tierNumber, kMelder_string which, conststring32 criterion);
  93. void TextGrid_insertBoundary (TextGrid me, integer tierNumber, double t);
  94. void TextGrid_removeBoundaryAtTime (TextGrid me, integer tierNumber, double t);
  95. void TextGrid_setIntervalText (TextGrid me, integer tierNumber, integer intervalNumber, conststring32 text);
  96. void TextGrid_insertPoint (TextGrid me, integer tierNumber, double t, conststring32 mark);
  97. void TextGrid_setPointText (TextGrid me, integer tierNumber, integer pointNumber, conststring32 text);
  98. void TextGrid_writeToChronologicalTextFile (TextGrid me, MelderFile file);
  99. autoTextGrid TextGrid_readFromChronologicalTextFile (MelderFile file);
  100. autoTextGrid TextGrid_readFromCgnSyntaxFile (MelderFile file);
  101. autoTable TextGrid_downto_Table (TextGrid me, bool includeLineNumbers, int timeDecimals, bool includeTierNames, bool includeEmptyIntervals);
  102. autoTable TextGrid_tabulateOccurrences (TextGrid me, constVEC searchTiers, kMelder_string which, conststring32 criterion, bool caseSensitive);
  103. void TextGrid_list (TextGrid me, bool includeLineNumbers, int timeDecimals, bool includeTierNames, bool includeEmptyIntervals);
  104. void TextGrid_correctRoundingErrors (TextGrid me);
  105. autoTextGrid TextGrids_concatenate (OrderedOf<structTextGrid>* me);
  106. /* End of file TextGrid.h */
  107. #endif