<!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>Language Segmentation of Twitter Tweets using Weakly Supervised Language Model Induction</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>David Alfter</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Trier Universitätsring 15</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2013</year>
      </pub-date>
      <abstract>
        <p>This paper presents early results of a weakly supervised language model induction approach for language segmentation of multilingual texts with a special focus on short texts.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Twitter tweets often contain non-standard
language and they are limited to 140
characters. While not a problem in itself, these
restrictions can pose difficulties for
natural language processing systems
        <xref ref-type="bibr" rid="ref4 ref6 ref8">(Lui, Lau,
and Baldwin, 2014)</xref>
        . Furthermore, Tweets
may be written in more than one language
        <xref ref-type="bibr" rid="ref12">(Zubiaga et al., 2014)</xref>
        . This typically
happens when multilingual speakers switch
between the languages known to them,
between or inside sentences
        <xref ref-type="bibr" rid="ref4 ref6 ref8">(Jain and Bhat,
2014)</xref>
        . The resulting text is said to be
codeswitched
        <xref ref-type="bibr" rid="ref10 ref4 ref6 ref8">(Jain and Bhat, 2014; Solorio et
al., 2014)</xref>
        . This further complicates
matters for natural language processing systems
that need at least a certain degree of
knowledge of the language at hand such as
part-ofspeech taggers, parsers, or machine
translation
        <xref ref-type="bibr" rid="ref12 ref2 ref4 ref6 ref8">(Beesley, 1988; Jain and Bhat, 2014;
Zubiaga et al., 2014)</xref>
        . The performance of
“traditional” monolingual natural language
processing components on mixed language data
tends to be miserable, making it necessary to
identify the languages in a multilingual text
in order to get acceptable results
        <xref ref-type="bibr" rid="ref4 ref6 ref8">(Jain and
Bhat, 2014)</xref>
        . Even if the results are not
terrible, language identification and segmentation
can significantly increase the accuracy of
natural language processing tools
        <xref ref-type="bibr" rid="ref1">(Alex, Dubey,
and Keller, 2007)</xref>
        .
      </p>
      <p>
        Supervised methods perform well on the
task of language identification in general
        <xref ref-type="bibr" rid="ref4 ref5 ref6 ref8">(King and Abney, 2013; Lui, Lau, and
Baldwin, 2014)</xref>
        and on tweets
        <xref ref-type="bibr" rid="ref4 ref6 ref8 ref9">(Mendizabal,
Carandell, and Horowitz, 2014; Porta, 2014)</xref>
        ,
but they cannot always be applied. For one,
Tweets often contain a lot of non-standard
spellings and ad hoc spellings that may or
may not be due to the imposed character
limit. This can be problematic if the
supervised methods have only seen standard
spelling in training. Also, Tweets may
contain languages for which there is insufficient
data to train a supervised method. In these
cases, unsupervised approaches might yield
better results than supervised approaches.
      </p>
      <p>
        Language segmentation consists in
identifying the language borders within a
multilingual text
        <xref ref-type="bibr" rid="ref11">(Yamaguchi and Tanaka-Ishii,
2012)</xref>
        . Language segmentation is not the
same as language identification; the main
difference is that language identification
identifies the languages in a text, and
language segmentation “only” separates the text
into monolingual segments
        <xref ref-type="bibr" rid="ref11">(Yamaguchi and
Tanaka-Ishii, 2012)</xref>
        . Language segmentation
can be useful when direct language
identification is not available.
multi-label classification task. In contrast,
the proposed system uses a clustering
approach. The system induces n-gram language
models from the text iteratively and assigns
each word of the text to one of the induced
language models. One induction step consists
of the following steps:
• Forward generation: Generate language
models by moving forward through the
text
• Backward generation: Generate
language models by moving backwards
through the text
• Model merging: Merge the two most
similar models from the forward and
backward generation based on the
unigram distribution
      </p>
      <p>Generation starts at the beginning of the
text, takes the first word and decomposes it
into uni-, bi- and trigrams. These n-grams
are then added to the initial language model,
which is empty at the start. For each
following word, the existing language models
evaluate the word in question. The highest
ranking model is updated with the word. If no
model scores higher than the threshold value
for model creation, a new model is created.</p>
      <p>Backwards generation works exactly the
same, but starts at the end of the text and
moves towards the beginning of the text.</p>
      <p>Finally, the two models that have the most
similar unigram distribution are merged.
This way, the language models iteratively
amass information about different languages.</p>
      <p>The induction step is repeated at least
twice. At the end of the induction, while
there are two models that have a similarity
greater than a certain threshold value, these
models are merged.</p>
      <p>Language segmentation is then performed
by assigning each word in the text to the
model that yields the highest probability for
the word in question.
3</p>
    </sec>
    <sec id="sec-2">
      <title>Results</title>
      <p>Table 1 shows the results for a set of example
tweets manually collected from Twitter. For
all tweets, a gold standard has been
manually created and evaluated against. The
evaluation is that of a clustering task; the words
of a text are clustered around different
induced language models. Whenever the
language model induction outperformed the
supervised trained language models, the score
is indicated in bold.</p>
      <p>
        Besides the F score (F1), the F5 score
is also indicated. This score sets to 5,
weighting recall higher than precision. This
means that throwing together pairs that are
separate in the gold standard is penalized
more strongly than splitting pairs that
occur together in the gold standard
        <xref ref-type="bibr" rid="ref7">(Manning,
Raghavan, and Schütze, 2008)</xref>
        .
      </p>
      <p>
        For comparison purposes, a supervised
approach as described in
        <xref ref-type="bibr" rid="ref3">(Dunning, 1994)</xref>
        has been implemented. For the supervised
approach, language models for all relevant
languages have been trained on Wikipedia
dumps from the months June and July
2015 in the languages occurring in the data,
namely Greek, English, French, Polish and
Amharic. Since the Amharic wikipedia is
written in the Ge’ez script and the data only
contains transliterated Amharic, all Amharic
texts were transliterated prior to training.
Then, Tweets have been segmented by
assigning each word to the model with the highest
probability. Training on a corpus of Twitter
data, separated by language, might yield
better results for the supervised approach;
however, such a corpus would have to be compiled
first.
      </p>
      <p>For this toy example, the results show
that the language model induction seems to
work reasonably well with scores
comparable to the supervised approach, sometimes
even performing better than the supervised
approach.</p>
      <p>Closer inspection of the results reveals
that the language model induction tends to
generate too many clusters for a single
language, resulting in a degradation of the
accuracy, while on the other hand also being
able to separate the different languages
surprisingly well.</p>
      <p>For example, the first tweet “Μόλις
ψήφισα αυτή τη λύση Internet of Things, στο
διαγωνισμό BUSINESS IT EXCELLENCE.”
is decomposed into two English clusters and
two Greek clusters, with one erroneous
inclusion of ‘EXCELLENCE.’ in the Greek cluster.
• Things,
• Μόλις λύση διαγωνισμό EXCELLENCE.
• Internet of BUSINESS IT
• ψήφισα αυτή τη στο
Tweet 1
Tweet 2
Tweet 3
Tweet 4
Tweet 5</p>
      <p>The second tweet “Demain #dhiha6
Keynote 18h @dhiparis “The collective
dynamics of science-publish or perish; is it all
that counts?” par David” and its
decomposition. It is clear that we have one
English cluster and one French cluster, and two
other clusters, one of which could be
labeled ‘Named Entity’ cluster and the other
possibly ‘English with erroneous inclusion of
@dhiparis’. Interestingly, the French way of
notating time ‘18h’ is also included in the
French cluster.</p>
      <p>• Keynote “The collective of
sciencepublish or perish; it all that counts?”
• Demain 18h par
• #dhiha6 David</p>
      <p>The third tweet “Food and breuvages in
Edmonton are ready to go, just waiting
for the fans #FWWC2015 #bilingualism” is
split into one acronym group, three English
clusters and one French cluster with the
erroneous inclusion of ‘go’.</p>
      <p>• #FWWC2015
• breuvages, go
• Food, Edmonton, to, for, the
• in, waiting, #bilingualism
• and, are, ready, just, fans</p>
      <p>The fourth tweet “my dad comes back
from poland with two crates of strawberries,
żubrówka and adidas jackets omg” again is
split into two English clusters and one Polish
cluster with the erroneous inclusion of ‘back’.
• comes, from, with, two, crates, of,
strawberries, jackets, omg
• my, dad, poland, and, adidas
• back, żubrówka</p>
      <p>Finally, the last tweet ”Buna dabo naw
(coffee is our bread).” is decomposed as
follows. The English words are split across four
clusters while the transliterated Amharic text
is clustered together. The splitting is due to
the structure of the tweet; there is not enough
overlapping information to build an English
cluster.</p>
      <p>• (coffee
• bread).
• is
• our
• Buna dabo naw
4</p>
    </sec>
    <sec id="sec-3">
      <title>Conclusion</title>
      <p>The paper has presented the early findings of
a weakly supervised approach for language
segmentation that works on short texts. By
taking the text itself as basis for the induced
language models, there is no need for
training data. As the approach does not rely on
external language knowledge, the approach is
language independent.</p>
      <p>The results seem promising, but the
approach has to be tested on more data. Still,
being able to achieve results comparable to
supervised approaches with a weakly
supervised method is encouraging.
5</p>
    </sec>
    <sec id="sec-4">
      <title>Future work</title>
      <p>Future work should concern the reduction of
the number of generated clusters, ideally
arriving at one cluster per language.
Alternatively, it would be possible to smooth the
frequent switching of language models by taking
context into account.</p>
      <p>Also, since the structure of the text
strongly influences the presented approach,
some form of text normalization could be
used to increase the robustness of the system.
GaloTyri. “Μόλις ψήφισα αυτή τη λύση
Internet of Things, στο διαγωνισμό BUSINESS
IT EXCELLENCE.”. 19 June 2015, 12:06.
Tweet.</p>
      <p>HBS (HBS_Tweets). ”Food and
breuvages in Edmonton are ready to
go, just waiting for the fans #FWWC2015
#bilingualism”. 6 June 2015, 23:29. Tweet.</p>
      <p>katarzyne (wifeyriddim). ”my dad comes
back from poland with two crates of
strawberries, żubrówka and adidas jackets omg”.
8 June 2015, 08:49. Tweet.</p>
      <p>TheCodeswitcher. ”Buna dabo naw
(coffee is our bread).”. 9 June 2015, 02:12.
Tweet.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>Alex</surname>
            , Beatrice,
            <given-names>Amit</given-names>
          </string-name>
          <string-name>
            <surname>Dubey</surname>
          </string-name>
          , and Frank Keller.
          <year>2007</year>
          .
          <article-title>Using Foreign Inclusion Detection to Improve Parsing Performance</article-title>
          .
          <source>In Proceedings of the Conference on Empirical Methods on Natural Language Processing and Computational Natural Language Learning</source>
          , pages
          <fpage>151</fpage>
          -
          <lpage>160</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <surname>Beesley</surname>
            ,
            <given-names>Kenneth R.</given-names>
          </string-name>
          <year>1988</year>
          .
          <article-title>Language identifier: A computer program for automatic natural-language identification of on-line text</article-title>
          .
          <source>In Proceedings of the 29th Annual Conference of the American Translators Association</source>
          , volume
          <volume>47</volume>
          , page 54.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <surname>Dunning</surname>
          </string-name>
          , Ted.
          <year>1994</year>
          .
          <article-title>Statistical Identification of Language</article-title>
          . Computing Research Laboratory, New Mexico State University.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <surname>Jain</surname>
          </string-name>
          , Naman and Riyaz Ahmad Bhat.
          <year>2014</year>
          .
          <article-title>Language Identification in CodeSwitching Scenario</article-title>
          .
          <source>In Proceedings of the Conference on Empirical Methods on Natural Language Processing</source>
          , pages
          <fpage>87</fpage>
          -
          <lpage>93</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <surname>King</surname>
          </string-name>
          , Ben and Steven P Abney.
          <year>2013</year>
          .
          <article-title>Labeling the Languages of Words in MixedLanguage Documents using Weakly Supervised Methods</article-title>
          .
          <source>In Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics - Human Language Technologies</source>
          , pages
          <fpage>1110</fpage>
          -
          <lpage>1119</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <surname>Lui</surname>
            , Marco, Jey Han Lau, and
            <given-names>Timothy</given-names>
          </string-name>
          <string-name>
            <surname>Baldwin</surname>
          </string-name>
          .
          <year>2014</year>
          .
          <article-title>Automatic detection and language identification of multilingual documents</article-title>
          .
          <source>Transactions of the Association for Computational Linguistics</source>
          ,
          <volume>2</volume>
          :
          <fpage>27</fpage>
          -
          <lpage>40</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <surname>Manning</surname>
          </string-name>
          ,
          <string-name>
            <surname>Christopher</surname>
            <given-names>D</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Prabhakar</surname>
            <given-names>Raghavan</given-names>
          </string-name>
          , and
          <string-name>
            <given-names>Hinrich</given-names>
            <surname>Schütze</surname>
          </string-name>
          .
          <year>2008</year>
          .
          <article-title>Introduction to information retrieval</article-title>
          , volume
          <volume>1</volume>
          . Cambridge University Press.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <surname>Mendizabal</surname>
            , Iosu,
            <given-names>Jeroni</given-names>
          </string-name>
          <string-name>
            <surname>Carandell</surname>
            , and
            <given-names>Daniel</given-names>
          </string-name>
          <string-name>
            <surname>Horowitz</surname>
          </string-name>
          .
          <year>2014</year>
          .
          <article-title>TweetSafa: Tweet language identification</article-title>
          .
          <source>TweetLID @ SEPLN.</source>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <string-name>
            <surname>Porta</surname>
          </string-name>
          , Jordi.
          <year>2014</year>
          .
          <article-title>Twitter Language Identification using Rational Kernels and its potential application to Sociolinguistics</article-title>
          . TweetLID @ SEPLN.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          <string-name>
            <surname>Solorio</surname>
          </string-name>
          , Thamar, Elizabeth Blair, Suraj Maharjan, Steven Bethard, Mona Diab, Mahmoud Gohneim, Abdelati Hawwari,
          <string-name>
            <surname>Fahad</surname>
            <given-names>AlGhamdi</given-names>
          </string-name>
          , Julia Hirschberg,
          <string-name>
            <given-names>Alison</given-names>
            <surname>Chang</surname>
          </string-name>
          , et al.
          <year>2014</year>
          .
          <article-title>Overview for the First Shared Task on Language Identification in Code-Switched Data</article-title>
          .
          <source>In Proceedings of the Conference on Empirical Methods on Natural Language Processing</source>
          , pages
          <fpage>62</fpage>
          -
          <lpage>72</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <string-name>
            <surname>Yamaguchi</surname>
          </string-name>
          , Hiroshi and Kumiko TanakaIshii.
          <year>2012</year>
          .
          <article-title>Text segmentation by language using minimum description length</article-title>
          .
          <source>In Proceedings of the 50th Annual Meeting of the Association for Computational Linguistics</source>
          , pages
          <fpage>969</fpage>
          -
          <lpage>978</lpage>
          . Association for Computational Linguistics.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          <string-name>
            <surname>Zubiaga</surname>
            , Arkaitz, Inaki San Vicente, Pablo Gamallo, José Ramom Pichel, Inaki Alegria, Nora Aranberri, Aitzol Ezeiza, and
            <given-names>Vıctor</given-names>
          </string-name>
          <string-name>
            <surname>Fresno</surname>
          </string-name>
          .
          <year>2014</year>
          .
          <article-title>Overview of TweetLID: Tweet language identification at SEPLN 2014</article-title>
          .
          <article-title>TweetLID @ SEPLN</article-title>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>