dawolang 0.0.1 copy "dawolang: ^0.0.1" to clipboard
dawolang: ^0.0.1 copied to clipboard

outdatedDart 1 only

Word-based command and message language. Always grateful to dartlang, our little brother.

example/dawolang_example.dart

// Copyright (c) 2017, Heikki K Lappalainen. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.


import 'package:dawolang/dawolang.dart';

main() {

  var awesome = new Awesome();
  print('awesome: ${awesome.isAwesome}');
  ///  Putting LexiconBase in shape
  lb.build(':dawolang_example:');

  print(':dl-ex:     * * *     WORD-GALLERY    * * * ');
  int count = 0;
  for (var x = 0; x < lb.wordList.length; x++){
    print(lb.wordList[x]);
    count ++;
      if (count == 2){
        count = 0;
        print(' ');
      }
  }
  print(' :dl-ex:      * * *     WORD-GALLERY    * * *  done \n');

  print('-:dl-ex: ------------------------------------------------------ ');
  print('       * * *     COMMAND GROUPS    * * * ');
  lb.commandM.forEach((k,v) {print('$k, $v');});
  print('-:dl-ex: --------------------------------- done -------------- \n');

  an.analyzeStrS('We :CAN be :SURE that :STUFF will :GO in :SCHEDULE', lb.wordList);
  an.analyzeStrS(':PHOTO do :NOT cause :ANY :PROBLEM; to :YOU', lb.wordList);

  an.analyzeStrS(':TO further :DEVELOPMENT of :THINGS :CALL :US ', lb.wordList);
  an.analyzeStrS(':ALLOW :US :TO :SOLVE :ALL :PROBLEM s in this magtter', lb.wordList);

  an.analyzeStrS(':ONE more :WEEK :WILL :DO', lb.wordList);
  an.analyzeStrS(':YOU in :NEW :ROLE gives :MORE :VALUE :TO :THIS :PROJECT', lb.wordList);

  an.analyzeStrS(':ANY :WILL :DO', lb.wordList);
  an.analyzeStrS(':ANSWER :IS :NO', lb.wordList);
  print('---------------  an:weightString  --------------------------------');
  //  using list_tools library
  print(an.weightString(':TO further :DEVELOPMENT of :THINGS :CALL :US ', lb.wordList));
  print(an.weightString(':ALLOW :US :TO :SOLVE :ALL :PROBLEM s in this magtter', lb.wordList));

  print('---------------  an:weightString  done ---------------------------');

  ///  Employing library showRoom
  sr.showWords(lb.wordList);
  sr.showCommands(lb.commandM);
  sr.showCombination(lb.wordList, lb.commandM);
}
0
likes
0
pub points
15%
popularity

Publisher

unverified uploader

Word-based command and message language. Always grateful to dartlang, our little brother.

Homepage

License

unknown (LICENSE)

Dependencies

path

More

Packages that depend on dawolang