Skip to content

Instantly share code, notes, and snippets.

View powerdot's full-sized avatar
🦁

powerdot

🦁
View GitHub Profile
@powerdot
powerdot / 1. Переменные .js
Last active January 27, 2022 13:32
Учимся!
// Переменная - Variable (вериабл)
// 1.1. Переменная - это "коробка", в которой может храниться что угодно.
// Буквально всё.
let // - это команда для объявления переменной в коде. Чтобы она появилась.
// Цифры в переменных
let a = 5
let b = 5.55
<template>
<div class="container">
<block-editor :layout="{ menu: true, propertyEditor: true, history: false, editor: true }">
<myOwnBlock title="My Block"/>
</block-editor>
</div>
</template>
<script>
import BlockEditor from "vue-block-editor";
<template>
<div class="container">
<block-editor :layout="{ menu: true, propertyEditor: true, history: false, editor: true }">
</block-editor>
</div>
</template>
<script>
import BlockEditor from "vue-block-editor";
import 'vue-block-editor/dist/BlockEditor.css';
<template>
<block-content>
<!-- Insert block content -->
<propertyPopup title="Property title">
<!-- Insert elements for setup -->
</propertyPopup>
</block-content>
</template>
<script>
<script src="./az.min.js"></script>
<script src="./RTT/index.js"></script>
<script>
let triggers = [ ... ];
Az.Morph.init('./dicts', function(){
let Analysis = RussianTextTagger({triggers, loadedAz: Az, uniq_markers: true});
let result = Analysis("здесь текст для тэггера");
console.log(result);
let triggers = [ ... ];
let Analysis = require("russian-text-tagger")({triggers, uniq_markers: true});
async function Check(text){
let results = await Analysis(text);
console.log(results);
}
let triggers = [
{
name: "Приветсвие",
words: [{text: ["привет", "хелоу", "здарова", "хай", "прив"]}],
markers: ['hi'],
check_scope: 'sentences'
},
{
name: "Вопрос о времени работы",
words: [
{
name: "Триггер на включение музыки",
words: [
{normalized: ["включить", 'запустить', 'возобновить']},
{normalized: ['песня', 'музыка', 'трек']},
],
markers: ['music_on'],
strict_word_sequence: false,
strict_word_direction: true,
check_scope: 'sentences'
{
name: "Триггер включения света",
words: [
{normalized: "включить"},
{text: ["свет", "лампа", "светильник"]},
],
markers: ['light_on'],
strict_word_sequence: false,
strict_word_direction: true,
check_scope: 'sentences'
{
name: "Триггер включения света",
words: [
{normalized: "включить"},
{text: "свет"},
],
markers: ['light_on'],
strict_word_sequence: false,
strict_word_direction: true,
check_scope: 'sentences'