Package network.aika

Class Model

java.lang.Object
network.aika.Model
All Implemented Interfaces:
Writable
Direct Known Subclasses:
TextModel

public abstract class Model extends Object implements Writable
Author:
Lukas Molzberger
  • Field Details

  • Constructor Details

  • Method Details

    • init

      public abstract void init()
    • getIdByLabel

      public Long getIdByLabel(String label)
    • putLabel

      public void putLabel(String label, Long id)
    • getCustomDataInstanceSupplier

      public Supplier<Writable> getCustomDataInstanceSupplier()
    • setCustomDataInstanceSupplier

      public void setCustomDataInstanceSupplier(Supplier<Writable> customDataInstanceSupplier)
    • getCurrentRetrievalCount

      public long getCurrentRetrievalCount()
    • incrementRetrievalCounter

      public void incrementRetrievalCounter()
    • createNeuronId

      public long createNeuronId()
    • getTemplates

      public Templates getTemplates()
    • getCurrentThought

      public Thought<?> getCurrentThought()
    • setCurrentThought

      public void setCurrentThought(Thought<?> currentThought)
    • getActiveNeurons

      public Collection<NeuronProvider> getActiveNeurons()
    • lookupNeuronProvider

      public NeuronProvider lookupNeuronProvider(String tokenLabel, Model.NeuronProducer onNewCallback)
    • getNeuronProvider

      public NeuronProvider getNeuronProvider(String tokenLabel)
    • getNeuron

      public Neuron getNeuron(String tokenLabel)
    • getAllNeurons

      public Stream<NeuronProvider> getAllNeurons()
    • applyMovingAverage

      public void applyMovingAverage(Config trainingConfig)
    • getSuspensionHook

      public SuspensionCallback getSuspensionHook()
    • setSuspensionHook

      public void setSuspensionHook(SuspensionCallback suspensionCallback)
    • addToN

      public void addToN(int l)
    • getN

      public long getN()
    • setN

      public void setN(long n)
    • lookupNeuron

      public NeuronProvider lookupNeuron(Long id)
    • suspendUnusedNeurons

      public void suspendUnusedNeurons(long retrievalCount, SuspensionMode sm)
    • suspendAll

      public void suspendAll(SuspensionMode sm)
    • registerWeakReference

      public void registerWeakReference(NeuronProvider p)
    • register

      public void register(NeuronProvider p)
    • unregister

      public void unregister(NeuronProvider p)
    • open

      public void open(boolean create) throws IOException
      Throws:
      IOException
    • close

      public void close() throws IOException
      Throws:
      IOException
    • write

      public void write(DataOutput out) throws IOException
      Description copied from interface: Writable
      Serialize the fields of this object to out.
      Specified by:
      write in interface Writable
      Parameters:
      out - DataOuput to serialize this object into.
      Throws:
      IOException
    • readFields

      public void readFields(DataInput in, Model m) throws Exception
      Description copied from interface: Writable
      Deserialize the fields of this object from in.

      For efficiency, implementations should attempt to re-use storage in the existing object where possible.

      Specified by:
      readFields in interface Writable
      Parameters:
      in - DataInput to deseriablize this object from.
      Throws:
      Exception
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • createThoughtId

      public long createThoughtId()