awips2/cave/com.raytheon.viz.gfe/help/TextProductUserGuideNarrative/notes129.txt
2022-05-05 12:34:50 -05:00

2 lines
769 B
Text

Here is the algorithm used for time description. In general, instead of modifying every sub-phrase, we modify every other one. We just need to decide whether to start with even or odd sub-phrases. This method does not add the actual words; it simply flags the sub-phrase for subsequent processing (by "assembleSubPhrases"). As you can see, this algorithm is rather complicated since we have to account for null phrases that could end up as the empty string and should not be modified. Other algorithms could be substituted, but they would also have to take this into consideration. The "TimeDescriptor" module contains the configurable "timePeriod_desciptor_dict" which provides the wording for time desciptors such as "in the morning", "in the afternoon", etc.