Human Language Root Words & Lexicostatistics Calculator and eTCL Slot Calculator Demo Example

This page is under development. Comments are welcome, but please load any comments in the comments section at the bottom of the page. Please include your wiki MONIKER in your comment with the same courtesy that I will give you. Its very hard to reply intelligibly without some background of the correspondent. Thanks,gold


Pseudocode Section

gold Here is some eTCL starter code human language roots words. The impetus for these calculations was checking some references in Sumerian and Akkadian mathematics. Most of the testcases involve experiments or models, using assumptions and rules of thumb.

Pseudocode Section

    pseudocode can be developed from rules of thumb.
    pseudocode: enter time in years, number of remaining root words
    pseudocode: output fraction of (remaining root words) over (root words at time zero)
    pseudocode: ouput remaining root words as fraction
    pseudocode: rules of thumb can be 3 to 15 percent off, partly since g..in g..out.
    pseudocode: need test cases > small,medium, giant
    pseudocode: need testcases within range of expected operation.
    pseudocode: are there any cases too small or large to be solved? 

Testcases Section

In planning any software, it is advisable to gather a number of testcases to check the results of the program. The math for the testcases can be checked by pasting statements in the TCL console. Aside from the TCL calculator display, when one presses the report button on the calculator, one will have console show access to the capacity functions (subroutines).

Testcase 1


Screenshots Section

figure 1.

http://s26.postimg.org/thfta20m1/human_language_root_wrods_TCL_WIKI.gif


References:

  • Lord Rayleigh, Measurements of the Amount of Oil,Royal Society of London, Vol. 47 (1889 - 1890)

Appendix Code

appendix TCL programs and scripts

        # pretty print from autoindent and ased editor  
        # human language root words calculator
        # written on Windows XP on eTCL
        # working under TCL version 8.5.6 and eTCL 1.0.1
        # gold on TCL WIKI , 2may2014
        package require Tk
        namespace path {::tcl::mathop ::tcl::mathfunc}
        frame .frame -relief flat -bg aquamarine4
        pack .frame -side top -fill y -anchor center
        set names {{} { time years :} }
        lappend names {   root words at time zero :}
        lappend names { root words remaining after t years: }
        lappend names { answers: ratio remaining over original at t :}
        lappend names { remaining roots percentage :}
        lappend names { remaining roots percentage :}
        lappend names { remaining roots percentage :}
        foreach i {1 2 3 4 5 6 7} {
    label .frame.label$i -text [lindex $names $i] -anchor e
    entry .frame.entry$i -width 35 -textvariable side$i
    grid .frame.label$i .frame.entry$i -sticky ew -pady 2 -padx 1 }
        proc pi {} {expr acos(-1)}
        proc about {} {
            set msg " Human Language Root Words
            from TCL WIKI,
            written on eTCL "
            tk_messageBox -title "About" -message $msg }
         proc calculate { } {
            global answer2
            global side1 side2 side3 side4 side5
            global side6 side7 testcase_number 
            incr testcase_number           
            set years $side1  
            set roots1 $side2
            set roots2 $side3
            set percent 2.
   set percent [/ $roots1 [ expr { log(81) } ]    ]
            set modern_fraction [/ $percent 100. ]
            set side4 $modern_fraction
            set side5 $percent
            set side6 $percent
            set side7 $percent
            return $side5
             }
        proc fillup {aa bb cc dd ee ff gg} {
            .frame.entry1 insert 0 "$aa"
            .frame.entry2 insert 0 "$bb"
            .frame.entry3 insert 0 "$cc"
            .frame.entry4 insert 0 "$dd"
            .frame.entry5 insert 0 "$ee"
            .frame.entry6 insert 0 "$ff"
            .frame.entry7 insert 0 "$gg"}
        proc clearx {} {
            foreach i {1 2 3 4 5 6 7} {
                .frame.entry$i delete 0 end } }
        proc reportx {} {
            global side1 side2 side3 side4 side5
            global side6 side7 testcase_number
            console show;
            puts "%| table |printed in| tcl wiki format|% "
            puts "&| quantity| value| comment, if any|& "
            puts "&| testcase number| $testcase_number||& "
            puts "&| time years at time zero :| $side1 ||&"
            puts "&| root words :| $side2 ||& "
            puts "&| root words  :| $side3 ||& "
            puts "&| answers: remaining root words ratio :| $side4 ||&"
            puts "&| remaining root words percentage:| $side5 ||& "
            puts "&| remaining root words percentage:| $side6 ||&"
           puts "&| remaining root words percentage:| $side7 ||&"
           }
         frame .buttons -bg aquamarine4
        ::ttk::button .calculator -text "Solve" -command { calculate   }
        ::ttk::button .test2 -text "Testcase1" -command {clearx;fillup 1000. 200. 86.  .455   45.6  45.6   45.6  }
        ::ttk::button .test3 -text "Testcase2" -command {clearx;fillup 1000. 200. 86.  .455   45.6  45.6   45.6  }
        ::ttk::button .test4 -text "Testcase3" -command {clearx;fillup 1000. 200. 86.  .455   45.6  45.6   45.6  }     
        ::ttk::button .clearallx -text clear -command {clearx 
        }
        ::ttk::button .about -text about -command about
        ::ttk::button .cons -text report -command { reportx }
        ::ttk::button .exit -text exit -command {exit}
        pack .calculator  -in .buttons -side top -padx 10 -pady 5
        pack  .clearallx .cons .about .exit .test4 .test3 .test2   -side bottom -in .buttons
        grid .frame .buttons -sticky ns -pady {0 10}
        . configure -background aquamarine4 -highlightcolor brown -relief raised -border 30
        wm title . "Human Language Root Words Calculator"      
 

Pushbutton Operation


For the push buttons, the recommended procedure is push testcase and fill frame, change first three entries etc, push solve, and then push report. Report allows copy and paste from console, but takes away from computer "efficiency".

For testcases in a computer session, the eTCL calculator increments a new testcase number internally, eg. TC(1), TC(2) , TC(3) , TC(N). The testcase number is internal to the calculator and will not be printed until the report button is pushed for the current result numbers (which numbers will be cleared on the next solve button.) The command { calculate; reportx } or { calculate ; reportx; clearx } can be added or changed to report automatically, but is not recommended as computer efficiency is impaired. Another wrinkle would be to print out the current text, delimiters, and numbers in a TCL wiki style table as

  puts " %| testcase $testcase_number | value| units |comment |%"
  puts " &| volume| $volume| cubic meters |based on length $side1 and width $side2   |&"  


Comments Section

Please place any comments here, Thanks.