File size: 9,228 Bytes
557a17a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
<a href="https://github.com/luciangreen/Essay-Helper">Essay Helper</a> | <a href="https://github.com/luciangreen/Text-to-Breasonings">Text-to-Breasonings (Helps Earn High Distinctions)</a> | Grammar Logic (Helps Mind Map Details)
# Algorithm Writer with Lists
Generates random algorithms in List Prolog, which can be converted to a simple form similar to Prolog.
* algwriter-lists-mr.pl - generates algorithms with combinations of other algorithms with vague mind reading
* algwriter-lists-random.pl - generates algorithms with combinations of other algorithms at random
* grammar_logic_to_alg.pl - takes text, randomly generates details and appropriate algorithms for A (agreement), B (disagreement) and solution to B based on approximate parts of speech and the Text to Breasonings dictionary.
* grammar_logic_to_alg_random.pl - like the previous algorithm but randomly selects up to 10 sentences from the file to process.
* random_dependencies.pl - generates random (meaningless) algorithm specifications.
* combophil.pl - finds combinations of lines to write philosophies about.
* combophil_grammar_logic_to_alg.pl - finds all combinations in lines to write philosophies and does what grammar_logic_to_alg.pl (above) does.
* four_crosses.pl - finds 4 crosses to transition to PhD refinement.
* combophil2qadb.pl - generates algorithms from dictionary.
* mr_alg.pl and ya_phil_to_alg.pl - Yet Another Philosophy to Algorithm and Mind Read Algorithm (randomly produces 5 line algorithms with type checking, possibly about Lucian Academy philosophies).
Please contact Lucian Green at <a href="mailto:luciangreen@lucianacademy.com">luciangreen@lucianacademy.com</a> with questions, comments and feedback about Algorithm Writer with Lists.
# Getting Started
Please read the following instructions on how to install the project on your computer for generating algorithms.
# Prerequisites
* Please download and install SWI-Prolog for your machine at `https://www.swi-prolog.org/build/`.
# 1. Install manually
Download <a href="http://github.com/luciangreen/Algorithm-Writer-with-Lists/">this repository</a>, the <a href="https://github.com/luciangreen/listprologinterpreter">List Prolog Interpreter Repository</a> and the <a href="https://github.com/luciangreen/Text-to-Breasonings">Text to Breasonings Repository</a>.
# 2. Or Install from List Prolog Package Manager (LPPM)
* Download the <a href="https://github.com/luciangreen/List-Prolog-Package-Manager">LPPM Repository</a>:
```
mkdir GitHub
cd GitHub/
git clone https://github.com/luciangreen/List-Prolog-Package-Manager.git
cd List-Prolog-Package-Manager
swipl
['lppm'].
lppm_install("luciangreen","Algorithm-Writer-with-Lists").
halt
```
# Caution:
follow instructions in <a href="https://github.com/luciangreen/Text-to-Breasonings/blob/master/Instructions_for_Using_texttobr(2).pl.txt">Instructions for Using texttobr(2)</a> when using texttobr, texttobr2 or mind reader to avoid medical problems.
# Running Algorithm Writer with Lists with Mind Reader
* In Shell:
`cd Algorithm-Writer-with-Lists`
`swipl`
`['algwriter-lists-mr.pl'].`
* Enter `algwriter(Algorithm),writeln1(Algorithm).`
# Installing and Running Algorithm Writer with Lists at Random
* Download this repository.
* In SWI-Prolog, in the `"Algorithm-Writer-with-Lists"` folder, enter:
```
['algwriter-lists-random.pl'].
```
* Enter `algwriter(Algorithm),writeln1(Algorithm).`
# Installing and Running Grammar and Logic to Algorithm
* Download this repository.
* In SWI-Prolog, in the `"Algorithm-Writer-with-Lists"` folder, enter:
```
['grammar_logic_to_alg.pl'].
```
* Enter sentences and lines to randomly process to give details and algorithms to into `"file.txt"` in the `"Text-to-Breasonings"` folder. The output or the `gla.txt` file, depending on whether you run using (1) or (2) in the following will contain the sentences and algorithms with instructions about how to run them.
* Enter `grammar_logic_to_alg1.` (1) or paste the contents of `grammar_logic_to_alg_sh.txt` into the Terminal window on Mac (2).
# Installing and Running Grammar and Logic to Algorithm at Random
* Download this repository.
* In SWI-Prolog, in the `"Algorithm-Writer-with-Lists"` folder, enter:
```
['grammar_logic_to_alg_random.pl'].
```
* As stated above, rather than processing the whole file, this algorithm processes up to 10 random sentences.
* Enter many sentences and lines to randomly process to give details and algorithms to into `"file.txt"` in the `"Algorithm-Writer-with-Lists"` folder. The output or the `gla.txt` file, depending on whether you run using (1) or (2) in the following will contain the sentences and algorithms with instructions about how to run them.
* Enter `grammar_logic_to_alg1.` (1) or paste the contents of `grammar_logic_to_alg_sh.txt` into the Terminal window on Mac (2).
# Installing and Running Random Dependencies
* Download this repository.
* In SWI-Prolog, in the `"Algorithm-Writer-with-Lists"` folder, enter:
```
['random_dependencies.pl'].
```
* As stated above, the value of this algorithm's input is found by mentally inserting not and transformations.
* Enter `random_dependencies(A),writeln1(A).`
```
[substring,[[duplicates,[[]]],[findall,[[add_number_to_list,[[split_into_sentences,[[sort,[[list_head,[[reverse,[[findall,[[string_to_list,[[or,[[and,[[delete,[[map,[[]]]]],[]]]]]]]]]]]]],[map,[[length,[[maximum,[[length,[[reverse,[[split_into_sentences,[[member,[[map,[[]]]]]]],[]]]]]]],[delete,[[get_item_n,[[],[and,[[]]]]],[reverse,[[]]]]]]],[]]]]]]]]]]]]]
```
# Installing and Running Combinations of Lines of Philosophy
* Download this repository.
* In SWI-Prolog, in the `"Algorithm-Writer-with-Lists"` folder, enter:
```
['combophil.pl'].
```
* Finds combinations of lines to write philosophies about with e.g. a combination of 2 lines:
* Enter `combophil(2).`
# Installing and Running Combinations of Lines of Philosophy with Grammar and Logic to Algorithm
* Download this repository.
* In SWI-Prolog, in the `"Algorithm-Writer-with-Lists"` folder, enter:
```
['combophil_grammar_logic_to_alg.pl'].
```
* Enter sentences and lines to intermix (warning: takes all combinations of verbs and non verbs in file) and randomly process to give details and algorithms to into `"file.txt"` in the `"Text-to-Breasonings"` folder. The output in the following will contain the sentences and algorithms with instructions about how to run them.
* Enter `combophil_grammar_logic_to_alg1.`
# Installing and Running Four Crosses
* Download this repository.
* In SWI-Prolog, in the `"Algorithm-Writer-with-Lists"` folder, enter:
```
['four_crosses.pl'].
```
* Enter four levels of crosses of ideas to make a PhD-level connection.
* Enter `four_crosses.`
# grammar_logic_to_alg2.pl
* Converts files from e.g. grammar_logic_to_alg.pl to simplified algorithms with more specific command names. Breason out file.txt using <a href="https://github.com/luciangreen/Text-to-Breasonings">Text-to-Breasonings</a>, run grammar_logic_to_alg.pl, run
grammar_logic_to_alg2.pl, then run <a href="https://github.com/luciangreen/Text-to-Breasonings">Text-to-Breasonings Reading Algorithm</a> on the grammar_logic_to_alg2.pl output.
* Download this repository.
* In SWI-Prolog, in the `"Algorithm-Writer-with-Lists"` folder, enter:
```
['grammar_logic_to_alg2.pl'].
```
* Enter the number of words in file.txt to replace with computational language (it learns as it goes).
* Enter `grammar_logic_to_alg2(200).`
# combophil2qadb.pl
* Generates algorithms in qadb format from word dictionary.
* Download this repository.
* In SWI-Prolog, in the `"Algorithm-Writer-with-Lists"` folder, enter:
```
['combophil2qadb.pl'].
```
* Enter `.` or `\n` delimited algorithm ideas in `Text-to-Breasonings/file.txt` and enter:
`combophil2qadb.`
* Produces algorithms in `file-o.txt`.
# Installing and Running Yet Another Philosophy to Algorithm and Mind Read Algorithm
* Download this repository.
* In SWI-Prolog, in the `"Algorithm-Writer-with-Lists"` folder, enter:
```
['ya_phil_to_alg.pl.pl'].
```
* As stated above, Yet Another Philosophy to Algorithm randomly produces 5 line algorithms with type checking about all sentences in `Lucian-Academy/`.
* Enter `ya_phil_to_alg.`
* Produces the file `yet_more_phil_algs.txt`, containing, for example:
```
...n,length,list,number,n,round,number,number,n,sqrt,number,number,n,sqrt,number,number,n,round,number,number,n,sqrt,number,number...
```
* To produce one five-line algorithm, enter `mr_alg(Commands).`, producing:
* `Commands = [[[n,member],[[list],[_3386]]],[[n,member],[[list],[list]]],[[n,intersection],[[list],[list]]],[[n,member],[[list],[_5928]]],[[n,atom_string],[[atom],[string]]],[[n,string_length],[[string],[number]]]]`,
* where this algorithm means, "Take a member (the second item, the first output of member) of a list, take a member list of this list, etc.".
* Note: member(List,Item) is now member(Item,List) in List Prolog, which is different from the above.
# Authors
Lucian Green - Initial programmer - <a href="https://www.lucianacademy.com/">Lucian Academy</a>
# License
I licensed this project under the BSD3 License - see the <a href="LICENSE">LICENSE.md</a> file for details
|