Exemplo n.º 1
0
    public void TestSideload()
    {
        mock();
        // retrieve a concept
        var yesL = model.GetConcept("posack", ConceptType.ACTION, ConceptMode.L);

        // set certainty value
        yesL.Certainty = .99;
        // retrive a relation
        var yesG = model.GetConcept("POSACK", ConceptType.ACTION, ConceptMode.G);
        var r    = model.GetRelation(yesL, yesG);

        // set certainty value
        if (r != null)
        {
            r.Certainty = 0.43;
        }

        // for logging
        var json = Jsonifier.JsonifyUpdates(model, new[] { yesL }, new[] { r });

        Debug.Log(json);
        mock();
        model.SideloadCertaintyState(json);
    }
Exemplo n.º 2
0
    void LoadUserModel(string path)
    {
        string savedCertainties = File.ReadAllText(path);

        Debug.Log(savedCertainties);
        state.SideloadCertaintyState(savedCertainties);
    }