Documentation ¶
Index ¶
- Constants
- Variables
- func AcquireLock(name string)
- func AddAssocKV(coll A.Collection, key string, assoc Association)
- func AddEpisodeData(g Analytics, key string, episode_data EpisodeSummary)
- func AddKV(g Analytics, collname string, kv KeyValue)
- func AddLink(g Analytics, link Link)
- func AddLinkCollection(g Analytics, name string, nodecoll string) A.Collection
- func AddNode(g Analytics, kind string, node Node)
- func AddNodeCollection(g Analytics, name string) A.Collection
- func AddPromiseHistory(g Analytics, coll A.Collection, coll_name string, e PromiseHistory)
- func AddWeeklyKV_Go(g Analytics, collname string, t time.Time, value float64)
- func AddWeeklyKV_Unix(g Analytics, collname string, t int64, value float64)
- func AlreadyLinkType(existing []ConnectionSemantics, newlnk ConnectionSemantics) bool
- func AnnotateLeg(filename string, selected_sentences []Narrative, leg int, ...)
- func AppendFileValue(name string, value float64)
- func AppendStringToFile(name string, s string)
- func AssessPromiseOutcome(g Analytics, e PromiseHistory, ...) float64
- func BelongsToLinSet(sets LinSet, member string) (bool, string, string)
- func BelongsToSet(sets Set, member string) (bool, string, string)
- func BlockLink(g Analytics, c1 Node, rel string, c2 Node, weight float64)
- func CanonifyName(s string) string
- func CleanExpression(s string) string
- func Context(s string) float64
- func ContextAdd(s string)
- func ContextEval(s string) (string, float64)
- func ContextSet() []string
- func CreateLink(g Analytics, c1 Node, rel string, c2 Node, weight float64)
- func DoughNowt(then time.Time) (string, string)
- func EndService(lock Lock)
- func ExcludedByBindings(firstword, lastword string) bool
- func FirstDerivative(e PromiseHistory, qscale, tscale float64) float64
- func FractionateText2Ngrams(text string) [MAXCLUSTERS]map[string]float64
- func FractionateThenRankSentence(s_idx int, sentence string, total_sentences int, ...) float64
- func GetAdjacencyMatrixByInt(g Analytics, assoc_type string, symmetrize bool) ([][]float64, int, map[int]string)
- func GetAdjacencyMatrixByKey(g Analytics, assoc_type string, symmetrize bool) map[VectorPair]float64
- func GetAllWeekMemory(g Analytics, collname string) []float64
- func GetCollectionType(link Link) int
- func GetFullAdjacencyMatrix(g Analytics, symmetrize bool) ([][]float64, int, map[int]string)
- func GetLinkKey(link Link) string
- func GetLinkType(sttype int) string
- func GetLockTime(filename string) int64
- func GetNode(g Analytics, key string) string
- func GetPathsFrom(g Analytics, layer int, startkey string, sttype int, visited map[string]bool) []string
- func GetPrincipalEigenvector(adjacency_matrix [][]float64, dim int) []float64
- func GetUnixTimeKey(now int64) string
- func HashcodeSentenceSplit(str string) string
- func IncrLink(g Analytics, link Link)
- func IncrementLink(g Analytics, c1 Node, rel string, c2 Node)
- func InitializeContext()
- func InitializeSmartSpaceTime()
- func InsertNodeIntoCollection(g Analytics, node Node, coll A.Collection)
- func Intentionality(n int, s string, sentence_count int) float64
- func InvariantDescription(s string) string
- func KeyName(s string, n int) string
- func LearnLink(g Analytics, c1 Node, rel string, c2 Node, weight float64)
- func LearnWeeklyKV(g Analytics, collname string, t int64, value float64)
- func LinTogetherWith(sets LinSet, a1, a2 string)
- func LoadAssociations(db A.Database, coll_name string) map[string]Association
- func LoadNgram(g Analytics, n int)
- func LoadNgrams(g Analytics)
- func LoadPromiseHistoryKV2Map(g Analytics, coll_name string, extkv map[string]PromiseHistory)
- func LongitudinalPersistentConcepts(topics map[string]float64) [MAXCLUSTERS]map[string]float64
- func MatrixMultiplyVector(adj [][]float64, v []float64, dim int) []float64
- func NextWordAndUpdateLTMNgrams(s_idx int, word string, rrbuffer [MAXCLUSTERS][]string, total_sentences int, ...) (float64, [MAXCLUSTERS][]string)
- func OpenDatabase(name, url, user, pwd string) A.Database
- func Paren(s string, offset int) (string, int)
- func Print(a ...any) (n int, err error)
- func PrintMatrix(adjacency_matrix [][]float64, dim int, keys map[int]string)
- func PrintNodes(g Analytics, collection string)
- func PrintPromiseHistoryKV(g Analytics, coll_name string)
- func PrintVector(vec []float64, dim int, keys map[int]string)
- func Printf(format string, args ...interface{}) (n int, err error)
- func Println(a ...any) (n int, err error)
- func RandomAccept(probability float64) bool
- func RankByIntent(selected_sentences []Narrative, ...) map[string]float64
- func ReadAndCleanFile(filename string) string
- func RemoveLock(name string)
- func ReviewAndSelectEvents(filename string, selected_sentences []Narrative)
- func SaveAssociations(collname string, db A.Database, kv map[string]Association)
- func SaveNgram(g Analytics, n int, invariants [MAXCLUSTERS]map[string]float64)
- func SaveNgrams(g Analytics, invariants [MAXCLUSTERS]map[string]float64)
- func SavePromiseHistoryKVMap(g Analytics, collname string, kv []PromiseHistory)
- func SecondDerivative(e PromiseHistory, qscale, tscale float64) float64
- func SplitIntoSentences(text string) []string
- func SplitWithParensIntact(expr string, split_ch byte) []string
- func StaticIntent(g Analytics, str string) float64
- func SumWeeklyKV(g Analytics, collname string, t int64, value float64)
- func TextPrism(subject, mainpage string, paragraph_radius int) [MAXCLUSTERS]map[string]float64
- func TogetherWith(sets Set, a1, a2 string)
- func TrimParen(s string) string
- func UpdatePromiseHistory(g Analytics, coll_name, key string, e PromiseHistory)
- type AdjacencyMatrix
- type Analytics
- type Assessment
- type Association
- type ConnectionSemantics
- type EpisodeSummary
- type KeyValue
- type LinSet
- type Link
- type List
- type Lock
- type MatrixRow
- type Name
- type Narrative
- type Neighbours
- type Node
- func CreateNode(g Analytics, kind, short_description, vardescription string, weight float64, ...) Node
- func GetFullNode(g Analytics, key string) Node
- func NextDataEvent(g *Analytics, thread, collection, shortkey, data string, gap, begin, end int64) Node
- func PreviousEvent(g *Analytics, thread string) Node
- type PromiseContext
- type PromiseHistory
- func GetPromiseHistory(g Analytics, collname, key string) (bool, PromiseHistory, A.Collection)
- func LearnUpdateKeyValue(g Analytics, coll_name, key string, now int64, q float64, units string) PromiseHistory
- func PromiseContext_End(g Analytics, ctx PromiseContext) PromiseHistory
- func StampedPromiseContext_End(g Analytics, ctx PromiseContext, after time.Time) PromiseHistory
- type Score
- type SemanticLinkSet
- func GetNeighboursOf(g Analytics, node string, sttype int, direction string) SemanticLinkSet
- func GetPredecessorsOf(g Analytics, node string, sttype int) SemanticLinkSet
- func GetSuccessorsOf(g Analytics, node string, sttype int) SemanticLinkSet
- func InitializeSemanticLinkSet(start string) SemanticLinkSet
- type Set
- type VectorPair
Constants ¶
View Source
const ASSESS_EXCELLENT = 1.0
View Source
const ASSESS_EXCELLENT_S = "potential_trustworthiness_high"
View Source
const ASSESS_PAR = 0.5
View Source
const ASSESS_PAR_S = "potential_trustworthiness_ok"
View Source
const ASSESS_SUBPAR = 0.0
View Source
const ASSESS_SUBPAR_S = "potential_untrusted"
View Source
const ASSESS_WEAK = 0.25
View Source
const ASSESS_WEAK_S = "potential_trustworthinss_low"
View Source
const CF_MEASURE_INTERVAL = 5 * 60
View Source
const CF_MONDAY_MORNING = 345200
View Source
const CF_SHIFT_INTERVAL = 6 * 3600
View Source
const FORGET_FRACTION = 0.001 // this amount per sentence ~ forget over 1000 words
View Source
const GR_CONTAINS int = 2
View Source
const GR_EXPRESSES int = 3
View Source
const GR_FOLLOWS int = 1
View Source
const GR_NEAR int = 4
View Source
const GR_NONE int = 0
View Source
const HOURS_PER_SHIFT = 6
View Source
const INITIAL_VALUE = 0.5
View Source
const LOCKDIR = "/tmp" // this should REALLY be a private, secure location
View Source
const LOWEST_INTENT_CUTOFF = 0.3 // cutoff for keeping n-grams, measured in intent
View Source
const MAXCLUSTERS = 7
View Source
const MEANING_THRESH = 20 // reduce this if too few samples
View Source
const MILLI = 1000000
View Source
const MINIMUM_FREQ_CUTOFF = 3 // " , measured in occurrences
View Source
const MINUTES_PER_HOUR = 60
View Source
const MIN_LEGAL_KEYNAME = 3
View Source
const NANO = 1000000000
View Source
const NEVER = 0
View Source
const NOT_EXIST = 0
View Source
const REPEATED_HERE_AND_NOW = 1.0 // initial primer
View Source
const SECONDS_PER_DAY = (24 * SECONDS_PER_HOUR)
View Source
const SECONDS_PER_HOUR = (60 * SECONDS_PER_MINUTE)
View Source
const SECONDS_PER_MINUTE = 60
View Source
const SECONDS_PER_SHIFT = (HOURS_PER_SHIFT * SECONDS_PER_HOUR)
View Source
const SECONDS_PER_WEEK = (7 * SECONDS_PER_DAY)
View Source
const SECONDS_PER_YEAR = (365 * SECONDS_PER_DAY)
View Source
const SHIFTS_PER_DAY = 4
View Source
const SHIFTS_PER_WEEK = (4 * 7)
Variables ¶
View Source
var ALL_SENTENCE_INDEX int = 0
View Source
var ASSOCIATIONS = make(map[string]Association)
View Source
var ATTENTION_LEVEL float64 = 1.0
View Source
var CONTEXT map[string]float64
View Source
var EXCLUSIONS []string
View Source
var FORBIDDEN_ENDING = []string{"but", "and", "the", "or", "a", "an", "its", "it's", "their", "your", "my", "of", "as", "are", "is", "be", "with", "using", "that", "who", "to", "no", "because", "at", "but", "yes", "no", "yeah", "yay", "in"}
View Source
var FORBIDDEN_STARTER = []string{"and", "or", "of", "the", "it", "because", "in", "that", "these", "those", "is", "are", "was", "were", "but", "yes", "no", "yeah", "yay"}
View Source
var GR_DAY_TEXT = []string{
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday",
}
View Source
var GR_MONTH_TEXT = []string{
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
}
View Source
var GR_SHIFT_TEXT = []string{
"Night",
"Morning",
"Afternoon",
"Evening",
}
View Source
var KEPT int = 0
View Source
var LEGCOUNT int = 0
View Source
var LEG_SELECTIONS []string
View Source
var LEG_WINDOW int = 100 // sentences per leg
View Source
var LINKTYPES = []string{"none", "Follows", "Contains", "Expresses", "Near"}
View Source
var NODETYPES = []string{"topic", "ngram1", "ngram2", "ngram3", "ngram4", "ngram5", "ngram6", "event", "episode", "user", "signal"}
View Source
var SENTENCE_THRESH float64 = 100 // chars
View Source
var SKIPPED int = 0
View Source
var STM_NGRAM_RANK [MAXCLUSTERS]map[string]float64
View Source
var VERBOSE bool = false
View Source
var WORDCOUNT int = 0
Functions ¶
func AcquireLock ¶
func AcquireLock(name string)
func AddAssocKV ¶
func AddAssocKV(coll A.Collection, key string, assoc Association)
func AddEpisodeData ¶
func AddEpisodeData(g Analytics, key string, episode_data EpisodeSummary)
func AddLinkCollection ¶
func AddLinkCollection(g Analytics, name string, nodecoll string) A.Collection
func AddNodeCollection ¶
func AddNodeCollection(g Analytics, name string) A.Collection
func AddPromiseHistory ¶
func AddPromiseHistory(g Analytics, coll A.Collection, coll_name string, e PromiseHistory)
func AlreadyLinkType ¶
func AlreadyLinkType(existing []ConnectionSemantics, newlnk ConnectionSemantics) bool
func AnnotateLeg ¶
func AppendFileValue ¶
func AppendStringToFile ¶
func AssessPromiseOutcome ¶
func AssessPromiseOutcome(g Analytics, e PromiseHistory, assessed_quality, promise_upper_bound, trust_interval float64) float64
func CanonifyName ¶
func CleanExpression ¶
func ContextAdd ¶
func ContextAdd(s string)
func ContextEval ¶
func ContextSet ¶
func ContextSet() []string
func EndService ¶
func EndService(lock Lock)
func ExcludedByBindings ¶
func FirstDerivative ¶
func FirstDerivative(e PromiseHistory, qscale, tscale float64) float64
func FractionateText2Ngrams ¶
func FractionateText2Ngrams(text string) [MAXCLUSTERS]map[string]float64
func GetAdjacencyMatrixByInt ¶
func GetAdjacencyMatrixByKey ¶
func GetAdjacencyMatrixByKey(g Analytics, assoc_type string, symmetrize bool) map[VectorPair]float64
func GetAllWeekMemory ¶
func GetCollectionType ¶
func GetFullAdjacencyMatrix ¶
func GetLinkKey ¶
func GetLinkType ¶
func GetLockTime ¶
func GetPathsFrom ¶
func GetPrincipalEigenvector ¶
func GetUnixTimeKey ¶
func HashcodeSentenceSplit ¶
func InitializeContext ¶
func InitializeContext()
func InitializeSmartSpaceTime ¶
func InitializeSmartSpaceTime()
func InsertNodeIntoCollection ¶
func InsertNodeIntoCollection(g Analytics, node Node, coll A.Collection)
func InvariantDescription ¶
func LinTogetherWith ¶
func LoadAssociations ¶
func LoadAssociations(db A.Database, coll_name string) map[string]Association
func LoadNgrams ¶
func LoadNgrams(g Analytics)
func LoadPromiseHistoryKV2Map ¶
func LoadPromiseHistoryKV2Map(g Analytics, coll_name string, extkv map[string]PromiseHistory)
func LongitudinalPersistentConcepts ¶
func LongitudinalPersistentConcepts(topics map[string]float64) [MAXCLUSTERS]map[string]float64
func MatrixMultiplyVector ¶
func NextWordAndUpdateLTMNgrams ¶
func NextWordAndUpdateLTMNgrams(s_idx int, word string, rrbuffer [MAXCLUSTERS][]string, total_sentences int, ltm_every_ngram_occurrence [MAXCLUSTERS]map[string][]int) (float64, [MAXCLUSTERS][]string)
func OpenDatabase ¶
func PrintNodes ¶
func PrintPromiseHistoryKV ¶
func RandomAccept ¶
func RankByIntent ¶
func ReadAndCleanFile ¶
func RemoveLock ¶
func RemoveLock(name string)
func ReviewAndSelectEvents ¶
func SaveAssociations ¶
func SaveAssociations(collname string, db A.Database, kv map[string]Association)
func SaveNgrams ¶
func SaveNgrams(g Analytics, invariants [MAXCLUSTERS]map[string]float64)
func SavePromiseHistoryKVMap ¶
func SavePromiseHistoryKVMap(g Analytics, collname string, kv []PromiseHistory)
func SecondDerivative ¶
func SecondDerivative(e PromiseHistory, qscale, tscale float64) float64
func SplitIntoSentences ¶
func SplitWithParensIntact ¶
func StaticIntent ¶
func TextPrism ¶
func TextPrism(subject, mainpage string, paragraph_radius int) [MAXCLUSTERS]map[string]float64
func TogetherWith ¶
func UpdatePromiseHistory ¶
func UpdatePromiseHistory(g Analytics, coll_name, key string, e PromiseHistory)
Types ¶
type AdjacencyMatrix ¶
type AdjacencyMatrix [][]float64
type Analytics ¶
type Analytics struct { S_db A.Database S_graph A.Graph S_Nodes map[string]A.Collection S_Links map[string]A.Collection S_Episodes A.Collection // contains filtered or unexported fields }
func OpenAnalytics ¶
type Assessment ¶
type Association ¶
type ConnectionSemantics ¶
type EpisodeSummary ¶
type EpisodeSummary struct { Key string `json:"_key"` L float64 `json: L` // 1 article text (work output) LL float64 `json: LL` // 2 N float64 `json: N` // 3 average users per episode NL float64 `json: NL` // 4 I float64 `json: I` // 7 mistrust signals per unit text length W float64 `json: W` // 9 H/L - mistrusted work ratio (sampled article/article work) U float64 `json: U` // 11 sampled process discussion/sampled article work ratio M float64 `json: M` // 13 s/H - mistrust level (sampled history/history work) TG float64 `json: TG` // 15 av episode duration per episode TU float64 `json: TU` // 16 av episode duration per episode user BF float64 `json: Bot_fraction` // 21 bots/human users }
func GetEpisodeData ¶
func GetEpisodeData(g Analytics, key string) EpisodeSummary
type Link ¶
type Link struct { From string `json:"_from"` // mandatory field To string `json:"_to"` // mandatory field SId string `json:"semantics"` // Matches Association key Negate bool `json:"negation"` // is this enable or block? Weight float64 `json:"weight"` Key string `json:"_key"` // mandatory field (handle) }
type Narrative ¶
type Narrative struct {
// contains filtered or unexported fields
}
func FractionateSentences ¶
func FractionateSentences(text string) ([]Narrative, [MAXCLUSTERS]map[string][]int)
type Neighbours ¶
type Neighbours []int
type Node ¶
type Node struct { Key string `json:"_key"` // mandatory field (handle) - short name Data string `json: "data"` // Longer description or bulk string data Prefix string `json:"prefix"` // Collection: Hub, Node, Fragment? Weight float64 `json:"weight"` // importance rank Gap int64 `json:"gap"` // punctuation interval Begin int64 `json:"begin"` // Date of start End int64 `json:"end"` // Date of end }
func CreateNode ¶
func GetFullNode ¶
func NextDataEvent ¶
func PreviousEvent ¶
type PromiseContext ¶
func PromiseContext_Begin ¶
func PromiseContext_Begin(g Analytics, name string) PromiseContext
func StampedPromiseContext_Begin ¶
func StampedPromiseContext_Begin(g Analytics, name string, before time.Time) PromiseContext
type PromiseHistory ¶
type PromiseHistory struct { PromiseId string `json:"_key"` Q float64 `json:"q"` Q1 float64 `json:"q1"` Q2 float64 `json:"q2"` Q_av float64 `json:"q_av"` Q_var float64 `json:"q_var"` T int64 `json:"lastT"` T1 int64 `json:"lastT1"` T2 int64 `json:"lastT2"` Dt_av float64 `json:"dT"` Dt_var float64 `json:"dT_var"` V float64 `json:"V"` AntiT float64 `json:"antiT"` Units string `json:"units"` }
func GetPromiseHistory ¶
func GetPromiseHistory(g Analytics, collname, key string) (bool, PromiseHistory, A.Collection)
func LearnUpdateKeyValue ¶
func PromiseContext_End ¶
func PromiseContext_End(g Analytics, ctx PromiseContext) PromiseHistory
func StampedPromiseContext_End ¶
func StampedPromiseContext_End(g Analytics, ctx PromiseContext, after time.Time) PromiseHistory
type SemanticLinkSet ¶
type SemanticLinkSet map[string][]ConnectionSemantics
func GetNeighboursOf ¶
func GetNeighboursOf(g Analytics, node string, sttype int, direction string) SemanticLinkSet
func GetPredecessorsOf ¶
func GetPredecessorsOf(g Analytics, node string, sttype int) SemanticLinkSet
func GetSuccessorsOf ¶
func GetSuccessorsOf(g Analytics, node string, sttype int) SemanticLinkSet
func InitializeSemanticLinkSet ¶
func InitializeSemanticLinkSet(start string) SemanticLinkSet
type VectorPair ¶
Click to show internal directories.
Click to hide internal directories.