Packages

  • package root

    For detailed documentation on using the framework please see the README.md file at the Github repository at https://github.com/markblokpoel/lanag-core.

    Language Agents Simulation framework

    For detailed documentation on using the framework please see the README.md file at the Github repository at https://github.com/markblokpoel/lanag-core.

    Definition Classes
    root
  • package com
    Definition Classes
    root
  • package markblokpoel
    Definition Classes
    com
  • package lanag
    Definition Classes
    markblokpoel
  • package core

    Provides classes, objects and traits that specify the com.markblokpoel.lanag.core architecture of the simulation framework.

    Provides classes, objects and traits that specify the com.markblokpoel.lanag.core architecture of the simulation framework.

    Overview

    Most of the classes, objects and traits in this packages cannot be used on their own. Instead, they specify what minimally should be implemented in any Lanag agent-based simulation.

    Definition Classes
    lanag
    See also

    For an example implementation, see the source code of project ambiguity helps.

  • package jupyterdisplayers

    This package contains a collection of Displayer classes for nice html formatted output in Jupyter notebooks.

    This package contains a collection of Displayer classes for nice html formatted output in Jupyter notebooks.

    Definition Classes
    lanag
  • package math

    A collection of com.markblokpoel.lanag.math utility functions, grouped by topic.

    A collection of com.markblokpoel.lanag.math utility functions, grouped by topic.

    Definition Classes
    lanag
  • package rsa

    This package contains the implementation for the mathematical foundations of Rational Speech Act theory (Frank & Goodman, 2012).

    This package contains the implementation for the mathematical foundations of Rational Speech Act theory (Frank & Goodman, 2012).

    Definition Classes
    lanag
  • EDIT_DISTANCE
  • HAMMING_DISTANCE
  • Lexicon
  • StructuredLexicon
  • StructuredMappingFunction
  • package util

    Provides classes and objects for dealing with the simulation infrastructure.

    Provides classes and objects for dealing with the simulation infrastructure.

    Overview

    Spark simulations

    Use com.markblokpoel.lanag.util.SparkSimulation to create an instance of Spark running locally on your machine:

    import com.markblokpoel.lanag.com.markblokpoel.lanag.coreg.util.LocalSparkSimulation
    import LocalSparkSimulation.spark.implicits._
    
    val sequenceToBeParallelized = Seq(...)
    val rdd = LocalSparkSimulation.parallelize(sequenceToBeParallelized)

    You can now RDD functions like org.apache.spark.rdd.RDD.flatMap() and org.apache.spark.rdd.RDD.map() to apply transformations to the sequence.

    rdd.map(a => a +1)

    These will be executed lazily and in parallel. Until you write the results to file, or otherwise collect them, nothing will be executed. For a tutorial on Spark see the Apache Spark website https://spark.apache.org/docs/latest/quick-start.html.

    Global number generators

    The object com.markblokpoel.lanag.util.InteractionIdentifier is used in com.markblokpoel.lanag.core.Interaction to identify pairs of agents.

    The object com.markblokpoel.lanag.util.RNG specifies a global random number generator. Implementations of com.markblokpoel.lanag.core.Interaction that use this object exclusive will be repeatable for specific RNG seeds.

    Definition Classes
    lanag

package rsa

This package contains the implementation for the mathematical foundations of Rational Speech Act theory (Frank & Goodman, 2012).

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

Type Members

  1. case class Lexicon(vocabularySize: Int, contextSize: Int, data: Vector[Double], speakerDefinition: (Lexicon, Int) ⇒ Lexicon = Lexicon.asBlokpoeletalSpeaker, listenerDefinition: (Lexicon, Int) ⇒ Lexicon = Lexicon.asBlokpoelEtalListener) extends Serializable with Product

    A lexicon as defined in the Rational Speech Act theory (Frank & Goodman, 2012).

    A lexicon as defined in the Rational Speech Act theory (Frank & Goodman, 2012). This implementation supports both binary and graded lexicons. It also implements functions that constitute the Rational Speech Act model, i.e., to compute n-th order lexicons. The relationships between vocabulary and context are stored in a 1-dimensional vector. The following mapping:

    R1

    R2

    R3

    S1

    0.8

    0.2

    0.0

    S2

    0.0

    0.6

    0.4

    Is represented in data as a concatenation of the rows or length contextSize:

    Vector[Double](0.8, 0.2, 0.0, 0.0, 0.6, 0.4)

    Lexicons are immutable.

    vocabularySize

    The size of the vocabulary of this lexicon.

    contextSize

    The size of the context of this lexicon.

    data

    A 1-dimensional vector representing the relations between the vocabulary and context.

    Annotations
    @SerialVersionUID()
  2. class StructuredLexicon extends Lexicon

    A special type of Lexicon where signals and referents are represented by binary strings.

    A special type of Lexicon where signals and referents are represented by binary strings. Signal-referent relations are based on a measure of representational similarity.

    Annotations
    @SerialVersionUID()
  3. sealed trait StructuredMappingFunction extends AnyRef

Value Members

  1. object EDIT_DISTANCE extends StructuredMappingFunction with Product with Serializable

    Helper object that returns a function computing the edit distance between two binary string representations.

    Helper object that returns a function computing the edit distance between two binary string representations.

    See also

    See this Wikipedia entry on Edit Distance https://en.wikipedia.org/wiki/Edit_distance.

  2. object HAMMING_DISTANCE extends StructuredMappingFunction with Product with Serializable

    Helper object that returns a function computing the hamming distance between two binary string representations.

    Helper object that returns a function computing the hamming distance between two binary string representations.

    See also

    See this Wikipedia entry on Hamming Distance https://en.wikipedia.org/wiki/Hamming_distance.

  3. object Lexicon extends Serializable

    Companion object to Lexicon containing alternative constructors and generation functions.

  4. object StructuredLexicon extends Serializable

    Companion object to StructuredLexicon containing functions to generate graded or binary structured lexicons.

Inherited from AnyRef

Inherited from Any

Ungrouped