Set NLP Settings

@see https://developers.facebook.com/docs/messenger-platform/built-in-nlp
@return array
10519
public function setNLP($nlp_enabled = true, $model = 'ENGLISH', $custom_token = null, $verbose = false, $n_best = 1){
        return $this->call('me/nlp_configs', [
            'nlp_enabled' => $nlp_enabled,
            'model' => $model,
            'custom_token' => $custom_token,
            'verbose' => $verbose,
            'n_best' => $n_best
        ], self::TYPE_POST);
    }
339739
public function buildMessage()
    {
        $messages = [];
        foreach ($this->messageBuilders as $messageBuilder) {
            foreach ($messageBuilder->buildMessage() as $message) {
                $messages[] = $message;
            }
        }

        return $messages;
    }
71861
protected function setDefaults()
    {
        if (!isset($this->contentOptions['category']) 
                || (isset($this->contentOptions['category']) 
                        && empty($this->contentOptions['category']))) {
            $this->contentOptions['category'] = 'app';
        }
        if (!isset($this->contentOptions['mainParams'])) {
            $this->contentOptions['mainParams'] = [];
        }
        if (!isset($this->contentOptions['buttonParams'])) {
            $this->contentOptions['buttonParams'] = [];
        }
        if (!isset($this->contentOptions['language'])) {
            $this->contentOptions['language'] = null;
        }
        if (!isset($this->contentOptions['mainMessage'])) {
            $this->contentOptions['mainMessage'] = 'We use cookies on our websites to help us offer you the best online experience. By continuing to use our website, you are agreeing to our use of cookies. Alternatively, you can manage them in your browser settings.';
        }
        if (!isset($this->contentOptions['buttonMessage'])) {
            $this->contentOptions['buttonMessage'] = 'I understand';
        }
        if (!isset($this->cookieOptions['path'])) {
            $this->cookieOptions['path'] = '/';
        }
        if (!isset($this->cookieOptions['expires'])) {
            $this->cookieOptions['expires'] = 30;
        }
        if (!isset($this->cookieOptions['secure'])) {
            $this->cookieOptions['secure'] = false;
        }
        if (!isset($this->classOptions['classOuter'])) {
            $this->classOptions['classOuter'] = 'CookieMonsterBox';
        }
        if (!isset($this->classOptions['classInner'])) {
            $this->classOptions['classInner'] = '';
        }
        if (!isset($this->classOptions['classButton'])) {
            $this->classOptions['classButton'] = 'CookieMonsterOk';
        }
    }
538226
public function getTextSettings()
    {
        $description = $this->_(
                "Use the %%-sign to search for zero or more random characters and an _ for a single random character."
                ) . "\n" .
                $this->_("Leave empty to filter for missing content.");

        return array(
            'gaf_filter_text1' => array(
                'label'       => $this->_('Episode diagnosis'),
                'description' => $description,
                'required'    => false,
                ),
            );
    }
1224933
protected function loadMessages()
    {
        $message = $this->event->get('message');

        $text = $message['text'];

        if ($this->config->get('strip_annotations') === true && isset($message['annotations'])) {
            $start = $message['annotations'][0]['startIndex'];
            $length = $message['annotations'][0]['length'];
            $text = substr($text, $start + $length + 1);
        }

        $this->messages = [new IncomingMessage($text, $message['sender']['name'], $message['name'], $this->event->toArray())];
    }
1018500
public function setTranslations() {
        $locales      = $this->getLocales();
        $translations = [];

        foreach($locales as $locale => $options) {
            $path = $this->getFileFullPath($locale);

            $contents = Support\get_file_contents($path);

            $translations[$locale] = $contents;
        }

        $this->translations = $this->loaded = $translations;

        return $this;
    }
1272965
function setLanguage () {
		if (!defined('LANGUAGES')){
			define('LANGUAGES', 'en');
		}	
		$this->i18nURL();
		if (!defined('LANG')){
			if (!$this->lang){
				$this->lang = 'en';
			}
			define('LANG', $this->lang);
		}
	}
294490
public function setSettingsByRequest()
    {
        $allAllowedSettings = array_keys($this->allSettings()->toArray());

        return $this->settings()->set(request()->only($allAllowedSettings));
    }
1235723
public function getTextSettings()
    {
        $options = $this->util->getTranslated()->getEmptyDropdownArray() +
                $this->util->getDbLookup()->getOrganizations();

        foreach (['gaf_filter_text1', 'gaf_filter_text2', 'gaf_filter_text3', 'gaf_filter_text4'] as $i => $field) {
            $output[$field] = [
                'label'        => $this->_('Organization') . ' ' . ($i + 1),
                'multiOptions' => $options,
                'required'     => false,
                ];
        }


        return $output;
    }
488078
public function getTextSettings()
    {
        $description = sprintf($this->_(
                "Use the %%-sign to search for zero or more random characters and an _ for a single random character."
                ));

        return array(
            'gaf_filter_text1' => array(
                'label'       => $this->_('Activity'),
                'description' => $description,
                'required'    => true,
                ),
            'gaf_filter_text2' => array(
                'label'       => $this->_('Procedure'),
                'description' => $description,
                ),
            'gaf_filter_text3' => array(
                'label'       => $this->_('But not when'),
                'description' => sprintf($this->_("But skip when this text is found - use %%-sign as well.")),
                ),
            );
    }
392150
public function setMessage() {

		$fieldnames = func_get_args();
		$instance	= $this -> getMessageInstance();

		if(0 === count($fieldnames)) {

			foreach($this -> rules as $rule) {
				$fieldnames[$rule -> field] = $rule -> field;
			}
		}	

		foreach($fieldnames as $fieldname) {

			if(false === is_string($fieldname)) {
				return trigger_error(sprintf('All fieldnames used in "%s"() must be of the type string, "%s" given', __METHOD__, gettype($fieldname)), E_USER_ERROR);
			}
		}

		if(count($instance :: getFieldnames()) === 0) {
			$instance :: setFieldnames($fieldnames);
		}

		return $instance;
	}
865264
public static function set()
    {
        self::getInstance();

        $args = func_get_args();

        if (is_array($args[0]))
        {
            foreach ($args[0] as $key => $value)
            {
                self::$settings[$key] = $value;
            }
        }
        else
        {
            self::$settings[$args[0]] = $args[1];
        }
    }
1070334
public function setDefaultAction()
    {
        $params     = $this->params();
        $locator    = $this->getServiceLocator();
        $model      = $locator->get( 'Grid\User\Model\User\Group\Model' );
        $group      = $model->find( $params->fromRoute( 'id' ) );

        if ( empty( $group ) )
        {
            $this->getResponse()
                 ->setStatusCode( 404 );

            return;
        }

        if ( $group->predefined )
        {
            $this->getResponse()
                 ->setStatusCode( 403 );

            return;
        }

        if ( ! $this->getPermissionsModel()
                    ->isAllowed( $group, 'edit' ) )
        {
            $this->getResponse()
                 ->setStatusCode( 403 );

            return;
        }

        if ( ! $group->default )
        {
            $group->default = true;

            if ( $group->save() )
            {
                $this->messenger()
                     ->add( 'user.form.group.success',
                            'user', Message::LEVEL_INFO );
            }
            else
            {
                $this->messenger()
                     ->add( 'user.form.group.failed',
                            'user', Message::LEVEL_ERROR );
            }
        }

        return $this->redirect()
                    ->toRoute( 'Grid\User\GroupAdmin\List', array(
                        'locale' => (string) $this->locale(),
                    ) );
    }
950221
public function getSettings() : array
    {
        $cmd = new ListSettings($this->repo->getRoot());
        $res = $this->runner->run($cmd, new ListSettings\MapSettings());

        return $res->getFormattedOutput();
    }
808904
private function set_tags(){
    if ( $this->mode ){
      if ( $this->mode === 'vue' ){
        $tags = \bbn\x::merge_arrays($this->all_tags['js'], $this->all_tags['vue']);
      }
      else {
        $tags = $this->all_tags[$this->mode];
      }
      $this->tags = \bbn\x::merge_arrays($this->all_tags['common'], $tags);
      return $this->tags;
    }
  }
189432
public function actionManage() 
	{
		$setting = OmmuSettings::model()->findByPk(1);

		$model=new OmmuLanguages('search');
		$model->unsetAttributes();	// clear any default values
		if(isset($_GET['OmmuLanguages'])) {
			$model->attributes=$_GET['OmmuLanguages'];
		}

		$columns = $model->getGridColumn($this->gridColumnTemp());

		$this->pageTitle = Yii::t('phrase', 'Language Settings');
		$this->pageDescription = Yii::t('phrase', 'The layout of your social network includes hundreds of phrases of text which are stored in a language pack. SocialEngine comes with an English pack which is the default when you first install the platform. If you want to change any of these phrases on your social network, you can edit the pack below. If you want to allow users to pick from multiple languages, you can also create additional packs below. If you have multiple language packs, the pack you\'ve selected as your "default" will be the language that displays if a user has not selected any other language. Note: You can not delete the default language. To edit a language\'s details, click its name.');
		$this->pageMeta = '';
		$this->render('admin_manage', array(
			'model'=>$model,
			'columns' => $columns,
			'setting' => $setting,
		));
	}
461182
protected function setMessageType()
    {
        $type = [];
        if ($this->alternativeExists()) {
            $type[] = 'alt';
        }
        if ($this->inlineImageExists()) {
            $type[] = 'inline';
        }
        if ($this->attachmentExists()) {
            $type[] = 'attach';
        }
        $this->message_type = implode('_', $type);
        if ('' == $this->message_type) {
            //The 'plain' message_type refers to the message having a single body element, not that it is plain-text
            $this->message_type = 'plain';
        }
    }