// Instanciate a new VerbalExpression. You should use this method to
// initalize some internal var.
//
// Example:
//		v := verbalexpression.New().Find("foo")
331727
func New() *VerbalExpression {
	r := new(VerbalExpression)
	r.flags = MULTILINE | GLOBAL
	r.parts = make([]string, 0)
	return r
}
824040
func (v *VerbalExpression) And(ve *VerbalExpression) *VerbalExpression {
	return v.add("(?:" + ve.Regex().String() + ")")
}
430419
func (v *VerbalExpression) Captures(s string) [][]string {
	iter := 1
	if v.flags&GLOBAL != 0 {
		iter = -1
	}
	return v.Regex().FindAllStringSubmatch(s, iter)
}
26731
func AddInitialisms(initialisms ...string) error {
	for _, s := range initialisms {
		if len(s) < minInitialismLen || len(s) > maxInitialismLen {
			return fmt.Errorf("%s does not have length between %d and %d", s, minInitialismLen, maxInitialismLen)
		}
		commonInitialisms[s] = true
	}

	return nil
}
1201090
func (m *MockAgentProvider) Initialize(fw *choria.Framework, log *logrus.Entry) {
	m.ctrl.Call(m, "Initialize", fw, log)
}
288716
func (v *VerbalExpression) Any(s string) *VerbalExpression {
	return v.add(`(?:[` + quote(s) + `])`)
}
1346803
func NewPrimative(value interface{}) (*Primative, error) {
	primative := &Primative{}
	err := primative.UpdateValue(value)
	return primative, err
}
937367
func (v *VerbalExpression) Replace(src string, dst string) string {
	return v.Regex().ReplaceAllString(src, dst)
}
364211
func (v *VerbalExpression) Or(ve *VerbalExpression) *VerbalExpression {
	v.parts = append(v.parts, ve.Regex().String()+"|")
	return v
}
673684
func (i *PluginInitializer) Initialize(plugin admission.Interface) {
	if wants, ok := plugin.(WantsServiceResolver); ok {
		wants.SetServiceResolver(i.serviceResolver)
	}

	if wants, ok := plugin.(WantsAuthenticationInfoResolverWrapper); ok {
		if i.authenticationInfoResolverWrapper != nil {
			wants.SetAuthenticationInfoResolverWrapper(i.authenticationInfoResolverWrapper)
		}
	}
}
255819
func NewAnysOrExpressions(in interface{}, context *compiler.Context) (*AnysOrExpressions, error) {
	errors := make([]error, 0)
	x := &AnysOrExpressions{}
	m, ok := compiler.UnpackMap(in)
	if !ok {
		message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
		errors = append(errors, compiler.NewError(context, message))
	} else {
		// repeated NamedAnyOrExpression additional_properties = 1;
		// MAP: AnyOrExpression
		x.AdditionalProperties = make([]*NamedAnyOrExpression, 0)
		for _, item := range m {
			k, ok := compiler.StringValue(item.Key)
			if ok {
				v := item.Value
				pair := &NamedAnyOrExpression{}
				pair.Name = k
				var err error
				pair.Value, err = NewAnyOrExpression(v, compiler.NewContext(k, context))
				if err != nil {
					errors = append(errors, err)
				}
				x.AdditionalProperties = append(x.AdditionalProperties, pair)
			}
		}
	}
	return x, compiler.NewErrorGroupOrNil(errors)
}
614324
func (expr *Expr) IsAssignment() bool {
	terms, ok := expr.Terms.([]*Term)
	if !ok {
		return false
	}
	return terms[0].Value.Compare(Assign.Ref()) == 0
}
1364081
func initialize() {
	defaultLogger = &Logger{
		infoLog:    log.New(os.Stderr, initText+tagInfo, flags),
		warningLog: log.New(os.Stderr, initText+tagWarning, flags),
		errorLog:   log.New(os.Stderr, initText+tagError, flags),
		fatalLog:   log.New(os.Stderr, initText+tagFatal, flags),
	}
}
1133796
func (m *Dialect) Init() {
	if m.inited {
		return
	}
	m.inited = true
	for _, s := range m.Statements {
		s.init()
	}
}
969512
func (q *Query) WithInstrumentation(instr *Instrumentation) *Query {
	q.instr = instr
	return q
}
815268
func isInitialism(word string) (string, bool) {
	initialism := strings.ToUpper(word)
	_, ok := initialisms[initialism]
	return initialism, ok
}
1127969
func Initialize() {
	kanaToRomajiTrie = newTrie()
	romajiToHiraganaTrie = newTrie()
	romajiToKatakanaTrie = newTrie()

	tables := []string{HiraganaTable, KatakanaTable}
	for t, table := range tables {
		rows := strings.Split(table, "\n")
		colNames := strings.Split(string(rows[0]), "\t")[1:]
		for _, row := range rows[1:] {
			cols := strings.Split(string(row), "\t")
			rowName := cols[0]
			for i, kana := range cols[1:] {
				value := rowName + colNames[i]
				kanas := strings.Split(kana, "/")
				for _, singleKana := range kanas {
					if singleKana != "" {
						// add to tries
						kanaToRomajiTrie.insert(singleKana, value)
						if t == 0 {
							romajiToHiraganaTrie.insert(value, singleKana)
						} else if t == 1 {
							romajiToKatakanaTrie.insert(value, singleKana)
						}
					}
				}
			}
		}
	}
}