pdfファイルからテキストを抽出し、コーパスオブジェクトを作成しました。tm_map条件付き行をマージする
テキスト内には、 "、"または " - "で終わる行があり、同じ文に属するので、次の行を追加したいと思います。例えば
私は
[1566] "this and other southeastern states (Eukerria saltensis,"
[1567] "Sparganophilus helenae, Sp. tennesseensis). In the"
を持っていると私は改行を置き換えるようなものを試してみました代わりに
[1566] "this and other southeastern states (Eukerria saltensis, Sparganophilus helenae, Sp. tennesseensis). In the"
を持っていると思いますが、成功しません:
tm_map(myCorpus, content_transformer(gsub), pattern =",$\n",replacement = "")
どれでも私はRでこれをどうやってやることができるのか?ここで