<!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>Software.zhishi.schema: A Software Programming Taxonomy Derived from Stackover ow</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jiangang Zhu</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Haofen Wang</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Beijun Shen</string-name>
          <email>bjsheng@sjtu.edu.cn</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>East China University of Science and Technology</institution>
          ,
          <addr-line>Shanghai, 200237</addr-line>
          ,
          <country country="CN">China</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>School of Software, Shanghai Jiao Tong University</institution>
          ,
          <addr-line>Shanghai, 200240</addr-line>
          ,
          <country country="CN">China</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper, we are the rst to construct a software programming taxonomy from Stackover ow. More precisely, we propose a machine learning based method with novel features to capture the hierarchical semantic structure of tags in Stackover ow. A graph pruning algorithm is applied to eliminate the con icts by constructing a Directed Acyclic Graph (DAG). As a result, our dataset, named Software.zhishi.schema, contains 38,205 concepts together with 36,249 subsumption relations. In order to further test the usability of our published data, we adopt a similarity computing task of words from software programming which is one of the most fundamental tasks in the software repository mining area. The results show that our dataset can outperform other knowledge bases due to its high coverage with nergrained domain concepts.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>? Corresponding author
3 http://stackoverflow.com/</p>
      <p>Unlabeled</p>
      <p>
        Tag Pairs
about software programming. They can also re ect the fast changing nature of
technique terms because they are created on the y by Web users. So the large
amount of tags provide a promising way to build the taxonomy. In this paper,
we propose a machine learning based approach to construct the taxonomy. To the
best of our knowledge, we are the rst to build a software programming taxonomy
from Stackover ow. Our contributions mainly include: (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) We propose a
semisupervised learning approach with novel features to detect subsumption relations
between tags from Stackover ow. (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) The largest public available taxonomy about
software programming has been published with several access mechanisms. (3) An
application study is carried out to show the e ectiveness of our dataset.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Approach</title>
      <p>Features We adopt a classi cation model to determine the correct subsumption
relation of each tag pair. The details of features we used are as follows: Lexical
Feature LCS: the token-based longest common sub-string asymmetric similarity.
Co-occurrence-based Features CQ: the Normalized Google Distance on the
questions that the tags in the candidate tag pair have ever occurred in. CT:
the Normalized Google Distance on the tags that the tags in the candidate tag
pair have ever occurred with. CW: the Normalized Google Distance on the wiki
descriptions that the tags in the candidate tag pair have ever occurred in. CS:
the Normalized Google Distance on the sentences in all wiki descriptions that the
tags in the candidate tag pair have ever occurred in. CU: the Normalized Google
Distance on the users who have ever annotated the tags in the candidate tag
pair. Topic-based Features TW: the KL-divergence on the topic distributions
of the wiki descriptions of the candidate tag pair. TQ: the KL-divergence on
the topic distributions of the randomly selected questions of the candidate tag
pair. Wikipedia-based Features EW: the cosine similarity on the
Wikipediabased representations (similar to ESA [1]) of the wiki descriptions of the candidate
tag pair. EQ: the cosine similarity on the Wikipedia-based representations of the
randomly selected questions of the candidate tag pair.</p>
      <p>
        Semi-supervised Learning with Constraints The whole work ow of our
approach can be seen in Figure 1. We apply a simple but e ective semi-supervised
learning framework - self-training. Moreover, in order to avoid error propagation
to the following iterations, we add two constraints and lter out incorrect or
redundant subsumptions by leveraging the global structure information. We have
identi ed two general types of constraints in subsumption detection problem: (
        <xref ref-type="bibr" rid="ref1">1</xref>
        )
Software.zhishi.schema
Cycle Con ict Constraint: For two tags a and b, if there is a hypernym path from a
to b, then we could constrain the subsumption set to have no hypernym path from
b to a because subsumption relation is asymmetric. (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) Transitive Redundancy
Constraint: Given three tags a, b and c, if a subsumes b, b subsumes c and a
subsumes c, then the subsumption relation between a and c is redundant due to the
transitivity of subsumption. These constraints are quite important to guarantee the
quality of newly-added training data in each iteration. Cycle Con ict Constraint
can avoid introducing error examples. While the Transitive Redundancy Constraint
can remove redundancies in each iteration. This will guide the learner to learn more
ne-grained subsumption relations. To deal with the constraints, in each iteration,
we rst construct a weighted direct graph. Then, a pruning algorithm is applied to
nd an optimal taxonomy. We use the Support Vector Machine (SVM) algorithm
with RBF kernel to train the binary classi er. As for training data, we propose an
e ective rule-based method to create labeled data. Some lexical-syntactic patterns
(similar to Hearst pattern. e.g. NP1 is a/an NP2) on descriptions of tags are
applied to generate candidate subsumption relations.
      </p>
      <p>DAG Construction We introduce a graph-based algorithm that works well
in practice to convert subsumption relation set into an optimal tree-structured
taxonomy. We rst construct a weighted directed graph from the subsumption
relation set. The weight of the edge is the con dence generated by SVM
classi er.Then, we apply Edmonds' algorithm4 to nd a maximum optimum
branching of a weighted directed graph. The resulting taxonomy will be optimal
with the sum of the edge weights is maximized.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Preliminary Results and Web Access</title>
      <p>Subsumption Accuracy Evaluation According to the results, the accuracy
increases consistently when we perform more iterations. In particular, after the
seventh iteration, the learner with constraints achieves the best accuracy of
85:96% 2:21% (1,000 samples with Wilson interval ).</p>
      <p>Linked Data Software.zhishi.schema creates URIs for all concepts. The
pattern http://seonto.apexlab.org/stackoverflow/tag/[label] comprises of
two parts. http://seonto.apexlab.org/stackoverflow/tag/ is the namespace.
The other part is the tag label. We use rdfs:subClassOf for subclassOf relations.
When Semantic Web agents that accept \application/rdf+xml" content type
access our server, resource descriptions in the RDF format will be returned. Our
dataset is available at http://datahub.io/dataset/software-zhishi-schema.</p>
      <p>Lookup Service We provide a lookup service for users to access
Software.zhishi.schema. The service is available at http://seonto.apexlab.org/
lookup. Given a query, all tags whose labels exactly match the query are returned.
We can click on any parent tag or child tag to switch to another page view.
Such an interaction stands for navigation in our taxonomy. As a representative
example shown in Fig. 2, our taxonomy contains a hyponym path like \data
structures"!\tree"!\binary tree"!\binary search tree"!\avl tree".</p>
      <sec id="sec-3-1">
        <title>4 http://en.wikipedia.org/wiki/Edmonds'_algorithm</title>
        <p>SPARQL Endpoint We also provide a SPARQL endpoint for professional
users at http://seonto.apexlab.org/sparql.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Application</title>
      <p>In this section, we investigate whether our dataset can outperform others
by constructing a similarity computing experiment on terms from software
programming. It is one of the most fundamental tasks in many research areas in
software engineering. Unfortunately, there is no benchmark data set for semantic
relatedness measuring on terms from software programming. In our experiment,
we make our own data set and o er it as a standard for testing terms semantic
relatedness5. We use the WUP [2] similarity as a semantic relatedness metric on
our dataset. WUP similarity on WordNet and ESA [1] are used as comparison
methods. We leverage Spearman rank correlation as the evaluation measure.
Experimental result shows that our dataset signi cantly improves the performance
of term semantic relatedness measurement. The results of WUP on WordNet and
ESA are only 0.0238 and 0.2244 respectively while WUP similarity on our dataset
can achieve the spearman correlation of 0.4608.</p>
      <p>Acknowledgements This research is supported by 973 Program in China
(Grant No. 2015CB352203), National Natural Science Foundation of China (Grant
No. 61472242, Grant No. 61402173) and the Fundamental Research Funds for the
Central Universities (Grant No: 22A201514045).</p>
      <sec id="sec-4-1">
        <title>5 The test collection is available at http://seonto.apexlab.org/termsim</title>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Gabrilovich</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Markovitch</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Computing semantic relatedness using wikipediabased explicit semantic analysis</article-title>
          .
          <source>In: IJCAI</source>
          . vol.
          <volume>7</volume>
          , pp.
          <volume>1606</volume>
          {
          <issue>1611</issue>
          (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Wu</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Palmer</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Verbs semantics and lexical selection</article-title>
          .
          <source>In: Proceedings of the 32nd annual meeting on Association for Computational Linguistics</source>
          . pp.
          <volume>133</volume>
          {
          <fpage>138</fpage>
          .
          <article-title>Association for Computational Linguistics (</article-title>
          <year>1994</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>