Packages

  • package root
    Definition Classes
    root
  • package ch
    Definition Classes
    root
  • package usi
    Definition Classes
    ch
  • package inf
    Definition Classes
    usi
  • package reveal
    Definition Classes
    inf
  • package parsing
    Definition Classes
    reveal
  • package units

    Provides classes representing information units (structured and textual units) and meta information (like tf vectors and type mentions).

    Provides classes representing information units (structured and textual units) and meta information (like tf vectors and type mentions).

    Overview

    Information units (implementing the trait InformationUnit) represent paragraphs in a given document, which can be narrative text (NaturalLanguageTaggedUnit) or structured fragments (CodeTaggedUnit). Each information unit exports a set of meta-information (implementing the MetaInformation trait), which are ready made semantic data for simple analyses. This version of StORMeD provides the following meta-information:

    In the case a meta information is not provided for a unit, a AbsentMetaInformation object can be also provided.

    Tutorial

    Suppose you want to get all the types mentioned in a question. First, you retrieve all its information units:

    scala> val questionUnits = question.units
    questionUnits: Seq[ch.usi.inf.reveal.parsing.units.InformationUnit] = ...

    Instead of using the visitor to on all the HASTs, you can exploit the ready made data provided by the meta information. For example, to get all the meta information for units, you can use flatMap:

    scala> import ch.usi.inf.reveal.parsing.units._
    import ch.usi.inf.reveal.parsing.units._
    
    scala> val questionMetaInfos = questionUnits.flatMap { _.metaInformation }
    questionMetaInfos: Seq[ch.usi.inf.reveal.parsing.units.MetaInformation] = List(...)

    You need now to filter to get only the CodeTypesMetaInformation, and then you can get, for example, the mentioned qualified Types:

    scala> val codeTypesMetaInfos = questionMetaInfos.filter { _.isInstanceOf[CodeTypesMetaInformation] }.asInstanceOf[Seq[CodeTypesMetaInformation]]
    codeTypesMetaInfos: Seq[ch.usi.inf.reveal.parsing.units.CodeTypesMetaInformation] = List(...)
    
    scala> val types = codeTypesMetaInfos.flatMap { _.qualifiedTypes }.distinct
    types: Seq[ch.usi.inf.reveal.parsing.model.java.ReferenceTypeNode] = List(...)
    Definition Classes
    parsing
  • package similarity
    Definition Classes
    units
  • ASTNodeCollectorVisitor
  • InformationUnitSimilarity
  • MetaComparable
  • MetaInformationFeatures
  • MetaInformationSimilarities
  • NaturalLanguageTaggedUnitFactory
  • NlpUtils
  • NonSequenceVisitor
  • SimilarityParameters
o

ch.usi.inf.reveal.parsing.units.similarity

MetaInformationSimilarities

object MetaInformationSimilarities

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MetaInformationSimilarities
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  15. def sim(meta: MetaInformation[_], other: MetaInformation[_])(implicit parameters: SimilarityParameters): Option[Double]
  16. def sim[T <: HASTNode](first: Seq[T], second: Seq[T])(implicit parameters: SimilarityParameters): Option[Double]
  17. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  18. def toString(): String
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped