Skip to main content
. 2020 Nov 5;20(21):6302. doi: 10.3390/s20216302
Algorithm  1: Fragmentation modification algorithm in the knowledge-based postprocessing stage
Input: An identified segments sequence  TUG={(subti|i=1,2,3,,N}, The ith subtask segment subti
Output: A modified and identified segments sequence MTUG={(msubti|i=1,2,3,,N}, The ith modified subtask segment msubti
1: subt1=ssubt1//ssbt1 is the semantic subtask of sitting.
2: subtN1=ssubt1
3: subtN=ssubt1
4: fori from 2 to N2 do
5: if subti != subti1 && subti1 == subti+1 then
6:   subti = subti1
7: else if subti != subti1 && subti+1 != subti1 && subti+2 == subti1 then
8:   subti = subti1
9: end if
10: msubti = subti
11: end for
12: msubt1=ssubt1
13: msubtN1=ssubt1
14: msubtN=ssubt1
15: returnMTUG