C# Class VW.Serializer.VowpalWabbitJsonBuilder

Build VowpalWabbitExample from JSON following https://github.com/JohnLangford/vowpal_wabbit/wiki/JSON
Inheritance: IDisposable
ファイルを表示 Open project: arielf/vowpal_wabbit Class Usage Examples

Public Methods

Method Description
CreateExample ( ) : VowpalWabbitExample

Creates the managed example representation.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Parse ( JsonReader reader, ILabel label = null, List extensions = null ) : void

Parses the example.

VowpalWabbitJsonBuilder ( VowpalWabbitJsonSerializer serializer, IVowpalWabbitExamplePool vwPool, VowpalWabbitDefaultMarshaller defaultMarshaller, JsonSerializer jsonSerializer, int multiIndex = -1 ) : System

Initializes a new instance of VowpalWabbitJsonBuilder.

Private Methods

Method Description
Dispose ( bool disposing ) : void
MarshalFloatFeature ( VowpalWabbitMarshalContext context, VW.Serializer.Intermediate.Namespace ns, ulong index, float value ) : void
Parse ( List path, VowpalWabbitMarshalContext namespaceContext, VW.Serializer.Intermediate.Namespace ns ) : void
ParseFeature ( List path, string featureName ) : void

Expects that actual feature value.

ParseFeature ( VowpalWabbitMarshalContext context, VW.Serializer.Intermediate.Namespace ns, string featureName ) : void

Expects that actual feature value.

ParseFeatureArray ( VowpalWabbitMarshalContext context, VW.Serializer.Intermediate.Namespace ns ) : void

Expects: "1,2.2,3]" (excluding the leading [)

ParseFeatureArrayReUsable ( ) : IVowpalWabbitMarshalAction

Expects: "1,2.2,3]" (excluding the leading [)

ParseFeatureReUsable ( ) : IVowpalWabbitMarshalAction
ParseLabel ( ) : void
ParseNamespaceAndFeatures ( List path, string namespaceValue ) : void

Parses { "feature1":1, "feature2":true, .... }

ParseProperties ( List path ) : void
ParseSpecialProperty ( VowpalWabbitJsonParseContext context, string propertyName ) : void
VowpalWabbitJsonBuilder ( ) : System

Method Details

CreateExample() public method

Creates the managed example representation.
public CreateExample ( ) : VowpalWabbitExample
return VowpalWabbitExample

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

Parse() public method

Parses the example.
public Parse ( JsonReader reader, ILabel label = null, List extensions = null ) : void
reader Newtonsoft.Json.JsonReader The example to parse.
label ILabel /// Optional label, taking precedence over "_label" property found in . /// If null, will be inspected and the "_label" property used as label. ///
extensions List Action to be executed when special properties are discovered.
return void

VowpalWabbitJsonBuilder() public method

Initializes a new instance of VowpalWabbitJsonBuilder.
public VowpalWabbitJsonBuilder ( VowpalWabbitJsonSerializer serializer, IVowpalWabbitExamplePool vwPool, VowpalWabbitDefaultMarshaller defaultMarshaller, JsonSerializer jsonSerializer, int multiIndex = -1 ) : System
serializer VowpalWabbitJsonSerializer
vwPool IVowpalWabbitExamplePool
defaultMarshaller VowpalWabbitDefaultMarshaller
jsonSerializer Newtonsoft.Json.JsonSerializer
multiIndex int
return System