How you would extract only the /
with the following capital letters, and the whole [[:punct:]]/$[[:punct:]]
.
text <- c("This/ART ,/$; Is/NN something something/else A/VAFIN faulty/ADV text/ADV which/ADJD i/PWS propose/ADV as/APPR Example/NE ./$. So/NE It/PTKNEG makes/ADJD no/VAFIN sense/ADV at/KOUS all/PDAT ,/$, it/APPR Has/ADJA Errors/NN ,/$; and/APPR it/APPR is/CARD senseless/NN again/ART ./$:")
# HOW to?
textPOS <- strsplit(text,"( )|(?<=[[:punct:]]/\\$[[:punct:]])", perl=TRUE)
# ^^^
# extract only the "/" with the following capital letters
# and the whole "[[:punct:]]/$[[:punct:]]"
# Expected RETURN:
> textPOS
[1] "/ART" ",/$;" "/NN" "/VAFIN" "/ADV" "/ADV" "/ADJD" "/PWS" "/ADV" "/APPR" "/NE" "./$." "/NE" "/PTKNEG" "/ADJD" "/VAFIN" "/ADV" "/KOUS" "/PDAT" ",/$," "/APPR" "/ADJA" "/NN" ",/$;" "/APPR" "/APPR" "/CARD" "/NN" "/ART" "./$:"
Thank you! :)