<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Extraction of Named Entities from Semi-Structured Texts for Medical Domain</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Natalia Zhukova</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Maksim Berezov</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sergey Lebedev</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ekaterina Zavadskaya</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>ITMO University</institution>
          ,
          <addr-line>Kronverksky Pr. 49, 197101 St. Petersburg</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>National Research University Higher School of Economics</institution>
          ,
          <addr-line>Myasnitskaya ulitsa 20, 101000, Moscow</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>There are many unstructured text data stored in health information systems (HIS). To use this data for automatic processing it is necessary to be able to extract specific medical entities such as prescribed drugs, diagnosis, body conditions and so on. The article is concerned with building discriminatory models for solving the problem of named-entity extraction (NEE) for medical texts in Russian. Such models as Markov random fields and support vector machines (SVM) are considered. These methods showed better results in comparison with other NEE methods for English language corpuses. The application of these methods to text in Russian and moreover to medical text that burdened with specific medicine terminology is still a problem. To solve this problem the processes of feature extraction and models building are described in the context of said texts. Methods are evaluated on a corpus received from Federal Almazov North-West Medical Research Center. As a result, the most accurate method in according to F1-measure is chosen.</p>
      </abstract>
      <kwd-group>
        <kwd>Named-entity extraction</kwd>
        <kwd>SVM</kwd>
        <kwd>Markov Random Fields</kwd>
        <kwd>Russian medical texts</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Natural Language Processing is a field of computer science, computational linguistics
concerned with the interactions between computers and human languages, and
concerned with programming computers to fruitfully process large natural language
corpora [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. NLP methods are especially acute for medical texts processing. There are a
lot of texts have been stored in health information systems. But this data is weakly
structured and cannot be used for automated analysis without preliminary processing.
From the other hand, these texts contain very important expertise that can be used for
data analyses or health care quality evaluation. That is why it is very important to be
able to correctly extract useful information, which in the future will facilitate the work
of medical or insurance personnel.
      </p>
      <p>The task of the NLP for semi-structured medical texts differs from the processing
of conventional texts because of the specific characteristics – absence of verbs, lack
of emotional coloring, lack of homonymy, presence of standard patterns. Such
properties make effective processing of available texts with the help of dictionaries and
rulebased approaches. However, the perspective development direction is the use of ML
methods. ML, in combination with available methods, is necessary for selecting those
entities that are not in the dictionary, and can also be used to increase the prediction
accuracy of entities, which are already in the dictionary.</p>
      <p>Identifying special entities is a kind of information extraction (IE). For NLP it is
one of the basic tasks. Identifying named entities in text is called Named Entity
Recognition (NER). More accurate, NER is the task that seeks to locate and classify
entities in text into pre-defined categories. This task is extremely significant for the
processing of semi-structed medical texts. The most important difference is the
obligatory presence of the context dependency. Therefore, to effectively solve this
problem, we can use only those methods that take into account the context (CRF) or
partially consider the context (SVM). In contrast to texts of general orientation, where we
can achieve great accuracy using almost any ML method.</p>
      <p>The objective of this research is context-dependent NER from medical texts in
Russian gotten from one of the Russian medical center. Contextual dependency is
provided by the type of records (diaries, complaints, etc.) and the available
dictionaries obtained earlier. And also by the specific features of each named entity. For
example, for drugs – this is the use of the active substance to find an analogue in the
dictionary. The following requirements for NER-module can be singled out:
replenishment of the dictionary (based on new entities) and integration with other classifiers
and modules in the existing NLP system.</p>
      <p>The article is organized as follows. First, the existing methods for NER are
presented and the scientific researches in this area are analyzed. Specification of texts
and technology – is in the third section. The description of the methods used, the
construction of a feature space and the adjustment of models are presented in the fourth
section. After that, the results of the experiment will be presented and conclusions
will be drawn about the applicability of these methods for solving NER problem.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Existing NER approaches</title>
      <p>There are three main approaches for solving this problem: rule-based, ML based and
mixed approach. We will consider in detail only ML methods, which are divided into
generative and discriminative models (see Fig.1).
Generative models randomly generate observable data values, typically given
some hidden parameters. It specifies a joint probability distribution over observation
and label sequences. Discriminative models directly estimate posterior probabilities,
they don’t try to model underlying probability distributions. This is the key difference
between them.</p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref2 ref3">2-3</xref>
        ], the authors conclude that discriminative models are more effective for
NER than generative models.
      </p>
      <p>
        As we can see in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], authors reach good results using SVM-classifier for NER in
English medical texts. They consider it suitable for this problem.
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], author comes to the conclusion that, in general, CRFs outperformed SVMs
for clinical texts. But both are effective.
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], author achieves results more than 90% for all measures. This gives us
reason to assume that these methods are highly effective for this task.
      </p>
      <p>Thus, we can distinguish two most suitable discriminative models for NER for
clinical texts – CRF, SVM.</p>
      <p>
        However, these methods do not find proper reflection in research [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] in Russian.
Authors prefer to use other approaches and the accuracy of their results is not given.
      </p>
      <p>Research that does not relate to medical data processing deserves special attention.</p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] authors proposed two baselines (knowledge-based and statistical) for
Russian language NER. They obtained results of 62.17% and 75.05% F1-measure. They
find these results very promising, given that neither of our baselines employs
morphological or syntactical analysis.
      </p>
      <p>
        In article [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] authors extracted names of organizations, media, locations, and
geopolitical entities using CRF. They come to the conclusion that this approach is
suitable and gives high accuracy.
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] authors also used CRF. They have explored the task of recognizing opinion
expressions in social media associated with diseases and drugs. Authors demonstrated
the superiority of CRF as compared to a dictionary-based method and recurrent neural
networks.
      </p>
      <p>
        This research [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] is related to fact extraction system. This paper was distinctive
and extremely useful for our research. We used the same four-level markup and the
same methodology for our experiment.
      </p>
      <p>One can draw a conclusion that CRF, SVM showed better results in comparison
with other NER methods for English language corpuses. The application of these
methods to text in Russian and moreover to medical text that burdened with specific
medicine terminology is still a problem. So, the main goal of this article is to apply
the most efficient discriminative models for increasing recognition accuracy for
medical texts in Russian. The obtained results of methods evaluation can be useful for
creators of modern health information systems.</p>
    </sec>
    <sec id="sec-3">
      <title>Technology of medical texts processing</title>
      <sec id="sec-3-1">
        <title>Data representation</title>
        <p>In the NER task, the machine learning algorithm is used to define labels for classes
of named entities for each word of the text. The label in this case can be the type of
the named entity or the label "unnamed entity". However, this approach to the
selection of labels does not allow us to establish the boundaries of entities in the case when
two named entities of the same type are near</p>
        <p>In the BIO representation, the region information is represented as the prefixes
“B”,” I”,” O”. Prefix “B” (Beginning) means that the current word is at the beginning
of a named entity, “I” (Inside) means that the current word is in a named entity, “O”
(Outside) means that word does not belong to named entity.</p>
        <p>Example (in origin language): [B-SUBSTANCE Метопролол] [O ( ] [B-DRUG:
эгилок-ретард] [O ) ] [B-DOSAGE 50] [I-DOSAGE мг] [B-FREQUENCY 1]
[IFREQUENCY раз] [I-FREQUENCY утром]
Where FN – number of false negative samples, TP – number of true positive samples.
 = !"!!"!"
 = !"!!"!"
Where FP – number of false positive samples, TP – number of true positive samples.</p>
        <p>= !!!!"!
3.3</p>
      </sec>
      <sec id="sec-3-2">
        <title>Medical texts processing algorithm</title>
        <p>In the article the processing of medical texts can be represented in the form of an
algorithm.</p>
        <p>1) Manual or partially automated marking of training medical data.
2) Construction of the classification model.
3) Construction of the feature space.
4) Classifier training.
5) Classification of the test set.</p>
        <p>6) Evaluation of the results
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Machine learning based methods</title>
      <p>In this section, a detailed description of each method used I given. We show the
implementation of this model for solving the problem and explain which features we
used, in other words we discuss the 2nd-5th steps of the algorithm. For the fourth and
fifth steps, we give the mathematical apparatus of the methods used.
4.1</p>
      <p>CRF</p>
      <sec id="sec-4-1">
        <title>Definition and constructing of the classification model. Conditional Random Field</title>
        <p>- statistical method of classification. A distinctive feature of this method is the ability
to take into account the context of an object. CRF is a discriminative non-directional
probabilistic graphic model.</p>
        <p>Formally, the Markov random field consists of the following components:
- Unoriented graph or factor graph G = (V, E) , where ∀ vertex is random variable
X and each edge is a relation between the random variables u and v.</p>
        <p>- A set of potential functions {φk}, one for each clique (full subgraph G of the
undirected graph) in the graph. The function φk puts each possible state of the clique
elements into a certain non-negative real-valued number.</p>
        <p>Vertexes that are not contiguous must correspond to conditionally independent
random variables. The group of adjacent vertices forms a clique, the set of states of
vertices is the argument of the corresponding potential function.</p>
        <p>Potential function should be chosen equal to</p>
        <p>φ (Yt − 1 , Yt , Xt ) = exp{ !!!! n ( Yt − 1 , Yt , Xt )}
Where f (Yt-1, Yt , Xt ) is feature function, and n are the corresponding parameters
of the model which should be evaluated in the learning process. Then the probability
of a chain of hidden variables (Y) under the condition of a chain of observables
variables (X) is:</p>
        <p>P(y|x) =
!
!!! ! (!!!! ,!! ,!! )
!
!! !!! ! ((!!!!)! ,(!!)! ,!! )
According the above, to solve NER problem we use linear CRF model with the size
of the maximum clique equals 3 (see Fig.2).</p>
        <p>Feature space. In the NER problem, features are understood as the characteristics
of words used by machine learning algorithms during the learning process and entity
recognition.</p>
        <p>The following set of characteristics was proposed:
Current word Xi
2 previous labels Yi-1 , Yi-2</p>
        <p>Type of current word Xi (all letters are capitalized, the first letter is capitalized, all
symbols are digits, word contains digit, word is alphanumerical, word contains dash,
word contains Roman numericals, words contain one capital letter in in the middle,
digits-coma-digits, digits-dot-digits, one digit, word is the first word of sentence,
word contains special symbols, word contains brackets in front of, word contains
brackets behind)</p>
        <p>Part of speech
Suffixes of length 2
Prefixes of length 2
Suffixes of length 3
Prefixes of length 3
Suffixes of length 4
Prefixes of length 4
Neighborhood words N = (Xi-3, Xi-2, Xi-1, Xi+1, Xi+2, Xx+3)
Conjunction Yi-1 with N
Type of word and POS for each word in N</p>
        <p>The size of the admissible set of X signs is large enough, it was decided to
use Random Forest algorithm for selecting the features.</p>
      </sec>
      <sec id="sec-4-2">
        <title>Definition and constructing of the classification model. Support vector machines</title>
        <p>(SVM) is binary classifiers, which outputs are +1 or -1 given a sample vector x. The
decision bases on separating hyperplane h(x).</p>
        <p>h(x) = +1,   +  &gt; 0  ∈ ,  ∈ Rn</p>
        <p>−1, ℎ
The class for an input is determined by side of the space separated by the
hyperplane, if h(x) = 0 it means that input sample lies on separating line. The key idea is to
find optimal hyperplane with the maximum margin (distance between nearest data
sample and plane). Speaking formally, we should minimize:
Also,
The solution of this problem is known and can be written in this form:
| ! |!
!</p>
        <p>
          → min
hi(w ∗ xi – b) ≥ 1, 1 ≤ i ≤ n
f(x) = w ∗ x + b =
!∈!"# yi ai x ∗ xi + b
Multi-class classifier. As we can see, classical SVM is suitable for binary
classification, but it is not our case. We should use method for constructing multi-class
classifier. The most progressive way is to use pairwise method proposed by Krebel and
extend the BIO representation to enable the training with the entire corpus. The idea of
this method is to combine a lot of binary classifiers. We construct N(N-1)/2 binary
SVMs, each of them votes (makes decision is sample belongs to i or j class). After
that we should choose class with maximum number of votes. But we can encounter
with unbalanced class distribution. Efficient way to solve it is to split the class
“Outside” into several sub- classes according to part-of-speech (POS) information of the
word. This approach was applied in the study [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]
Feature extracting. Input vector x – is feature representation of current word Xi and
its context in some area. To correctly convey the context, we are using 4 relatives’
positions of this word (2 in front of and 2 behind). For example, we denote word’s
position as i index. If it’s negative it means that we are talking about previous word
(which was i words before current word). Similarly, for positive indices (see fig.3).
1,
        </p>
        <p>Part of speech feature i, j =
       ℎ  − ℎ    
0, ℎ
       ℎ  − ℎ    
0, ℎ
Prefix feature i, j =</p>
        <p>Suffix feature i, j =
       ℎ  − ℎ    
0, ℎ</p>
        <p>Previous class feature i, j =
It’s very useful feature, we can use classes’ of already predicted words as features.
Note that the selection of the first three features requires the compilation of lists of
possible characteristic values (in contradistinction to CRF).</p>
        <p>Also, we use 14 type of word features, which we described in section about CRF
feature extracting.</p>
        <p>So, after feature extracting the dimension of input vector equals
5*(19+|POS|+|Prefix|+|Suffix|). We can reduce this dimension by using Random
Forest.
5</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Results</title>
      <p>The medical corps was provided partly by Federal Almazov North-West Medical
Research Center. and partly taken from open sources. The medical corps was
manually marked with a BIO markup. For testing the statistical model, manual BIO-marking
of about 700 sentences containing about 2000 named-entities was performed. It
should be noted that we singled out in a separate class every word that did not belong
to any of the entities</p>
      <p>The table below shows the results of a computational experiment on a training set
for CRF.
The table below shows the results of a computational experiment on a training set for
SVM.
As we can see, quite good results were achieved in recognizing such entities as Drug
and Substance. This is due to the fact that only one tag was used for their marking.
CRF is completely superior to its competitor.
Cross-validation is a model validation technique for assessing how the results of a
statistical analysis will generalize to an independent data set. It is mainly used in
settings where the goal is prediction, and one wants to estimate how accurately a
predictive model will perform in practice.</p>
      <p>5-fold cross-validation was used in the project. It means that the original
sample is randomly partitioned into 5 equal sized subsamples. Of the 5 subsamples, a
single subsample is retained as the validation data for testing the model, and the
remaining 4 subsamples are used as training data. The cross-validation process is then
repeated 5 times, with each of the 5 subsamples used exactly once as the validation
data. The 5 results from the folds are averaged to produce a single estimation.
6</p>
    </sec>
    <sec id="sec-6">
      <title>Conclusion and future work</title>
      <p>In this paper, two ML methods for solving NER problems have been described: CRF
and SVM. The article describes the general model of CRF, describes the details of
using and tuning the parameters of the linear model of CRF. Also, the concept of
using SVM for multiclass classification taking into account the context was presented.
As can be seen from the results of the experiment, CRF showed the best performance
for almost all named entities due to deeper consideration of the context. But we can
conclude that both approaches are applicable to the solution of our problem. Entities
with the highest recognition accuracy are drugs and substances. This may be due to
the fact that for markup we use, as a rule, only one tag, which essentially simplifies
the task.</p>
      <p>The results obtained tell us about the possibility of integration these methods into
our NLP system as new named-entity recognizer. Of course, it’s possible to improve
the results by analyzing typical classifier’s errors. This will be our further work in this
area, also we are trying to test the consistency of the idea of combining classifiers in a
cascade to increase the accuracy.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1. Wikipedia:
          <article-title>The Free Encyclopedia</article-title>
          .
          <source>Wikimedia Foundation, Inc. 22 July 2004. Web. 10 Aug</source>
          . (
          <year>2004</year>
          ). https://en.wikipedia.org/wiki/Natural_language_processing
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>T.</given-names>
            <surname>Jebarra</surname>
          </string-name>
          ,
          <source>Machine Learning: Discriminative and Generative</source>
          , Kluwer, (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3. Huang
          <string-name>
            <given-names>Z.</given-names>
            ,
            <surname>Xu</surname>
          </string-name>
          <string-name>
            <given-names>W.</given-names>
            ,
            <surname>Yu</surname>
          </string-name>
          <string-name>
            <surname>K</surname>
          </string-name>
          .
          <article-title>Bidirectional LSTM-CRF models for sequence tagging</article-title>
          //arXiv preprint arXiv:
          <fpage>1508</fpage>
          .
          <year>01991</year>
          , (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Kazama</surname>
          </string-name>
          , Jun'ichi, et al.
          <article-title>"Tuning support vector machines for biomedical named entity recognition."</article-title>
          <source>Proceedings of the ACL-02 workshop on Natural language processing in the biomedical domain-Volume 3. Association for Computational Linguistics</source>
          , (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Li</surname>
            , Dingcheng, Karin Kipper-Schuler, and
            <given-names>Guergana</given-names>
          </string-name>
          <string-name>
            <surname>Savova</surname>
          </string-name>
          .
          <article-title>"Conditional random fields and support vector machines for disorder named entity recognition in clinical texts." Proceedings of the workshop on current trends in biomedical natural language processing</article-title>
          .
          <source>Association for Computational Linguistics</source>
          (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Settles</surname>
            <given-names>B</given-names>
          </string-name>
          .
          <article-title>Biomedical named entity recognition using conditional random fields and rich feature sets //</article-title>
          <source>Proceedings of the International Joint Workshop on Natural Language Processing in Biomedicine and its Applications</source>
          , pp.
          <fpage>104</fpage>
          -
          <lpage>107</lpage>
          , Association for Computational Linguistics (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Богатырев</surname>
            <given-names>М. Ю.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Вакурин</surname>
            <given-names>В</given-names>
          </string-name>
          . С.
          <article-title>Концептуальное моделирование в исследовании биомедицинских данных //Математическая биология и биоинформатика</article-title>
          , pp.
          <fpage>340</fpage>
          -
          <lpage>349</lpage>
          , (
          <year>2013</year>
          )
          <article-title>-</article-title>
          Т. 8. -
          <fpage>№</fpage>
          .
          <fpage>1</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <surname>Ki-Joong</surname>
          </string-name>
          ,
          <article-title>Young-Sook Hwang, and</article-title>
          <string-name>
            <given-names>Hae-Chang</given-names>
            <surname>Rim</surname>
          </string-name>
          .
          <article-title>"Two-phase biomedical NE recognition based on SVMs."</article-title>
          <source>Proceedings of the ACL 2003 workshop on Natural language processing in biomedicine-Volume</source>
          <volume>13</volume>
          .
          <article-title>Association for Computational Linguistics (</article-title>
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Gareev R</surname>
          </string-name>
          . et al.
          <article-title>Introducing baselines for Russian named entity recognition //</article-title>
          <source>International Conference on Intelligent Text Processing and Computational Linguistics</source>
          , pp.
          <fpage>329</fpage>
          -
          <lpage>342</lpage>
          , Springer Berlin Heidelberg (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Mozharova</surname>
            <given-names>V. A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Loukachevitch</surname>
            <given-names>N. V.</given-names>
          </string-name>
          <article-title>Combining Knowledge and CRF-based Approach to Named Entity Recognition</article-title>
          in Russian //International Conference on Analysis of Images,
          <source>Social Networks and Texts</source>
          , pp.
          <fpage>185</fpage>
          -
          <lpage>195</lpage>
          , Springer, Cham (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11. Miftahutdinov
          <string-name>
            <given-names>Z.</given-names>
            <surname>Sh</surname>
          </string-name>
          . et al.
          <source>Identifying Disease-Related Expressions in Reviews Using Conditional Random Fields //Computational Linguistics and Intellectual Technologies</source>
          , pp.
          <fpage>155</fpage>
          -
          <lpage>166</lpage>
          , Proceedings of the Annual International Conference «Dialogue» (
          <year>2017</year>
          )
          <article-title>-</article-title>
          Т.
          <fpage>1</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Starostin</surname>
            <given-names>A. S.</given-names>
          </string-name>
          et al.
          <source>FactRuEval</source>
          <year>2016</year>
          :
          <article-title>Evaluation of Named Entity Recognition and Fact Extraction Systems for Russian //Computational Linguistics</article-title>
          and Intellectual Technologies, pp.
          <fpage>702</fpage>
          -
          <lpage>720</lpage>
          , Proceedings of the Annual International Conference «Dialogue»(
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>