0
我有這樣兩組數據幀,我想通過自己的字符串加入一個字符串是否包含在另一個字符串
> part <- data.frame(name = c("I", "want", "to", "go", "there", "you", "are", "seeing"),
+ value = c(0.77, 0.55, 0.33, 0.4, 0.5, 0.9, 1.0, 0.91))
> full <- data.frame(sentence = c("I want to go there", "you are seeing"))
加入他們,我怎麼能加入他們基於這樣的句子的名字是存在?像這樣
name value sentence
1 I 0.77 I want to go there
2 want 0.55 I want to go there
3 to 0.33 I want to go there
4 go 0.40 I want to go there
5 there 0.50 I want to go there
6 you 0.90 you are seeing
7 are 1.00 you are seeing
8 seeing 0.91 you are seeing
我想你會需要一個您的數據框中的一列,用於劃分一個句子結束位置和另一個句子結束位置。 –