Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • $\begingroup$ Thanks Sjoerd. StringSplit can't be used here because repeated substrings can have unique identifiers. StringTake followed by extracting the complementary ranges and sort them before applying Row works: complementaryRanges = Cases[ ReplacePart[(# - {0, 1}) & /@ Partition[ Drop[Flatten[ SortBy[Join[events[[All, 1]], timex[[All, 1]]], #[[1]] &]], 1], 2, 2, 1], {-1, 2} -> StringLength[I2B2[1, text]]], {s_, e_} /; e > s];Row[Last /@ SortBy[Join[events, timex, {#, StringTake[I2B2[file, text], #]} & /@ complementaryRanges], #[[1]] &]] $\endgroup$ Commented Jul 1, 2012 at 20:00