私は看護師でPythonを知っていますが、専門家ではなく、DNA配列
を処理するために使用しました。人間の言語で書かれた病院の記録を取得し、これらのデータをデータベースまたはcsvファイルに挿入することになっていますが、5000を超えています行とこれはとても難しいことができます。すべてのデータは一貫した形式で書かれています例を示しましょう
11/11/2010 - 09:00am : He got nausea, vomiting and died 4 hours later
次のデータを取得する必要があります
Sex: Male
Symptoms: Nausea
Vomiting
Death: True
Death Time: 11/11/2010 - 01:00pm
もう一つの例
11/11/2010 - 09:00am : She got heart burn, vomiting of blood and died 1 hours later in the operation room
そして、私は得る
Sex: Female
Symptoms: Heart burn
Vomiting of blood
Death: True
Death Time: 11/11/2010 - 10:00am
私が.......で言うとき、順序は一貫していません。したがって、inはキーワードであり、その後のすべてのテキストは、別のキーワードが見つかるまでの場所です
。 ...以下は、コンマ、ハイフンなどの区切り文字に従って分割する必要がある一連の症状ですが、同じ行が死んだ場合でも一貫しています
.....数時間後も、場合によっては何時間かかるはずです。患者はまだ生きていて退院しています....etc
つまり、私たちにはたくさんの慣習があり、キーワードとパターンでテキストをトークン化できれば、仕事を成し遂げることができると思います。したがって、Pythonでそれを行うための便利な関数/モジュール/チュートリアル/ツールを知っている場合はお願いします(Pythonでない場合はGUIツールがいいでしょう)
いくつかの情報:
there are a lot of rules to express various medical data but here are few examples
- Start with the same date/time format followed by a space followd by a colon followed by a space followed by He/She followed space followed by rules separated by and
- Rules:
* got <symptoms>,<symptoms>,....
* investigations were done <investigation>,<investigation>,<investigation>,......
* received <drug or procedure>,<drug or procedure>,.....
* discharged <digit> (hour|hours) later
* kept under observation
* died <digit> (hour|hours) later
* died <digit> (hour|hours) later in <place>
other rules do exist but they follow the same idea