Method CreateInMemoryDataSource
CreateInMemoryDataSource(string, LM, MetadataCollection)
Creates a new in-memory DataSource instance with the specified identifier and language model. This instance can subsequently be saved to a file using one of the Serialize methods.
public static DataSource CreateInMemoryDataSource(string identifier, LM model, MetadataCollection metadata = null)
Parameters
identifier
stringThe unique identifier for the data source.
model
LMThe language model to be associated with the data source.
metadata
MetadataCollectionOptional metadata to be associated with the data source.
Returns
- DataSource
A new in-memory DataSource instance that can later be persisted to disk via the Serialize(string) or Serialize(Stream) methods.