Ran gofmt.
@@ -3,8 +3,8 @@ package schema
// This file contains the logic to build an in-memory contextionary from the actions & things classes and properties.
import (
- "github.com/fatih/camelcase"
"fmt"
+ "github.com/fatih/camelcase"
"strings"
"github.com/creativesoftwarefdn/weaviate/models"
@@ -16,10 +16,14 @@ func (f *WeaviateSchema) BuildInMemoryContextionaryFromSchema(context *libcontex
in_memory_builder := libcontextionary.InMemoryBuilder((*context).GetVectorLength())
err := add_names_from_schema_properties(context, in_memory_builder, "THING", f.ActionSchema.Schema)
- if err != nil { return nil, err }
+ if err != nil {
+ return nil, err
+ }
err = add_names_from_schema_properties(context, in_memory_builder, "ACTION", f.ThingSchema.Schema)
- if err != nil { return nil, err }
+ if err != nil {
+ return nil, err
+ }
in_memory_contextionary := in_memory_builder.Build(10)
x := libcontextionary.Contextionary(in_memory_contextionary)
@@ -28,7 +32,7 @@ func (f *WeaviateSchema) BuildInMemoryContextionaryFromSchema(context *libcontex
// This function adds words in the form of $THING[Blurp]
func add_names_from_schema_properties(context *libcontextionary.Contextionary, in_memory_builder *libcontextionary.MemoryIndexBuilder, kind string, schema *models.SemanticSchema) error {
- for _, class := range(schema.Classes) {
+ for _, class := range schema.Classes {
class_centroid_name := fmt.Sprintf("$%v[%v]", kind, class.Class)
// Are there keywords? If so, use those
@@ -91,7 +95,7 @@ func add_names_from_schema_properties(context *libcontextionary.Contextionary, i
// NOW FOR THE PROPERTIES;
// basically the same code as above.
- for _, property := range(class.Properties) {
+ for _, property := range class.Properties {
property_centroid_name := fmt.Sprintf("%v[%v]", class_centroid_name, property.Name)
// Are there keywords? If so, use those
