├── .gitignore ├── README ├── bayes ├── bayes.go ├── classifier.go └── trainer.go ├── go.mod ├── iwlserve ├── api.go ├── authorinfo.go ├── data │ └── data.gobz ├── fs.go ├── main.go ├── paths.go ├── server.go ├── static │ ├── c.png │ ├── css │ │ ├── picnic.min.css │ │ └── site.css │ ├── favicon.ico │ ├── favicon.png │ ├── iwl.png │ ├── memoires.jpg │ ├── robots.txt │ ├── w.png │ └── writers │ │ ├── agatha_christie.jpg │ │ ├── anne_rice.jpg │ │ ├── arthur_clarke.jpg │ │ ├── arthur_conan_doyle.jpg │ │ ├── bram_stoker.jpg │ │ ├── charles_dickens.jpg │ │ ├── chuck_palahniuk.jpg │ │ ├── cory_doctorow.jpg │ │ ├── dan_brown.jpg │ │ ├── daniel_defoe.jpg │ │ ├── david_foster_wallace.jpg │ │ ├── douglas_adams.jpg │ │ ├── edgar_allan_poe.jpg │ │ ├── ernest_hemingway.jpg │ │ ├── george_orwell.jpg │ │ ├── gertrude_stein.jpg │ │ ├── h_g_wells.jpg │ │ ├── h_p_lovecraft.jpg │ │ ├── harry_harrison.jpg │ │ ├── isaac_asimov.jpg │ │ ├── j_k_rowling.jpg │ │ ├── j_r_r_tolkien.jpg │ │ ├── jack_london.jpg │ │ ├── james_fenimore_cooper.jpg │ │ ├── james_joyce.jpg │ │ ├── jane_austen.jpg │ │ ├── jonathan_swift.jpg │ │ ├── l_frank_baum.jpg │ │ ├── leo_tolstoy.jpg │ │ ├── lewis_carroll.jpg │ │ ├── margaret_atwood.jpg │ │ ├── margaret_mitchell.jpg │ │ ├── mark_twain.jpg │ │ ├── mary_shelley.jpg │ │ ├── neil_gaiman.jpg │ │ ├── oscar_wilde.jpg │ │ ├── p_g_wodehouse.jpg │ │ ├── ray_bradbury.jpg │ │ ├── robert_louis_stevenson.jpg │ │ ├── rudyard_kipling.jpg │ │ ├── stephen_king.jpg │ │ ├── stephenie_meyer.jpg │ │ ├── ursula_k_le_guin.jpg │ │ ├── william_gibson.jpg │ │ └── william_shakespeare.jpg └── templates │ ├── about-author.html │ ├── about.html │ ├── analyzing.html │ ├── badge.html │ ├── footer.html │ ├── header.html │ ├── index.html │ ├── result.html │ ├── share-buttons.html │ ├── site-info.html │ └── writer.html ├── iwltrain └── main.go └── tokenizer ├── sentences.go ├── specials.go ├── tokenizer.go └── words.go /.gitignore: -------------------------------------------------------------------------------- 1 | train-data 2 | disabled-train-data 3 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | 2 | I W R I T E L I K E 3 | +--------------------------------~~~~~~>>>> 4 | W | 5 | R | This is Go implementation of 6 | I | 7 | T | ~* I WRITE LIKE *~ 8 | E | 9 | | the most popular writing style analyzer 10 | L | i n t h e w h o l e w o r l d ! 11 | I | 12 | K | https://iwl.me 13 | E | 14 | 15 | ================================================= 16 | 17 | RUNNING 18 | ~~~~~~~ 19 | 20 | iwlserve is the thing you want to run on a server: 21 | 22 | $ iwlserve -s localhost:8080 23 | 24 | This starts an HTTP server on the given port. 25 | Without arguments it launches in FastCGI mode. 26 | 27 | 28 | LICENSE 29 | ~~~~~~~ 30 | 31 | Source code: 32 | 33 | The MIT License (MIT) 34 | Copyright (c) 2013-2022 Dmitry Chestnykh 35 | 36 | 37 | Permission is hereby granted, free of charge, to any person obtaining a copy of 38 | this software and associated documentation files (the "Software"), to deal in 39 | the Software without restriction, including without limitation the rights to 40 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 41 | of the Software, and to permit persons to whom the Software is furnished to do 42 | so, subject to the following conditions: 43 | 44 | The above copyright notice and this permission notice shall be included in all 45 | copies or substantial portions of the Software. 46 | 47 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 48 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 49 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 50 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 51 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 52 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 53 | SOFTWARE. 54 | 55 | * * * 56 | 57 | All images (located in iwlserve/static/ directory) are in the public domain. 58 | 59 | Data corpus (iwlserve/data/data.gobz directory) is in the public domain. 60 | 61 | Not a license, but a trademark notice: you cannot call your own publicly 62 | running version of the program (modified or not) "I Write Like" without my 63 | permission, but you may mention that it's "Powered by I Write Like". 64 | 65 | If you have any questions, please write to iwl@codingrobots.com. 66 | -------------------------------------------------------------------------------- /bayes/bayes.go: -------------------------------------------------------------------------------- 1 | package bayes 2 | 3 | import ( 4 | "compress/gzip" 5 | "encoding/gob" 6 | "io" 7 | "os" 8 | ) 9 | 10 | type Bayes struct { 11 | Categories []string 12 | // {category_index: 0, ...} 13 | Totals map[int]float64 14 | // {"word":{0:33, ...}} 15 | Tokens map[string][]uint32 16 | 17 | sumTotals float64 18 | } 19 | 20 | func New() *Bayes { 21 | return &Bayes{ 22 | Categories: make([]string, 0, 52), 23 | Totals: make(map[int]float64), 24 | Tokens: make(map[string][]uint32), 25 | } 26 | } 27 | 28 | func LoadFile(filename string) (*Bayes, error) { 29 | f, err := os.Open(filename) 30 | if err != nil { 31 | return nil, err 32 | } 33 | defer f.Close() 34 | return LoadReader(f) 35 | } 36 | 37 | func LoadReader(r io.Reader) (*Bayes, error) { 38 | z, err := gzip.NewReader(r) 39 | if err != nil { 40 | return nil, err 41 | } 42 | defer z.Close() 43 | var b Bayes 44 | if err := gob.NewDecoder(z).Decode(&b); err != nil { 45 | return nil, err 46 | } 47 | b.calcSumTotals() 48 | return &b, nil 49 | } 50 | 51 | func (b *Bayes) WriteFile(filename string) error { 52 | f, err := os.Create(filename) 53 | if err != nil { 54 | return err 55 | } 56 | z, err := gzip.NewWriterLevel(f, gzip.BestCompression) 57 | if err != nil { 58 | f.Close() 59 | return err 60 | } 61 | if err := gob.NewEncoder(z).Encode(b); err != nil { 62 | z.Close() 63 | f.Close() 64 | return err 65 | } 66 | if err := z.Close(); err != nil { 67 | f.Close() 68 | return err 69 | } 70 | if err := f.Sync(); err != nil { 71 | f.Close() 72 | return err 73 | } 74 | if err := f.Close(); err != nil { 75 | return err 76 | } 77 | return nil 78 | } 79 | 80 | func (b *Bayes) categoryIndex(cat string) int { 81 | // Try to find category. 82 | for i, v := range b.Categories { 83 | if v == cat { 84 | return i 85 | } 86 | } 87 | // Not found, append. 88 | b.Categories = append(b.Categories, cat) 89 | return len(b.Categories) - 1 90 | } 91 | 92 | func (b *Bayes) CategoryForIndex(catIndex int) string { 93 | return b.Categories[catIndex] 94 | } 95 | 96 | func (b *Bayes) NumberOfTokens() int { 97 | return len(b.Tokens) 98 | } 99 | 100 | func (b *Bayes) calcSumTotals() { 101 | b.sumTotals = 0 102 | for _, v := range b.Totals { 103 | b.sumTotals += v 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /bayes/classifier.go: -------------------------------------------------------------------------------- 1 | package bayes 2 | 3 | import ( 4 | "fmt" 5 | "math" 6 | "sort" 7 | 8 | "github.com/coding-robots/goiwl/tokenizer" 9 | ) 10 | 11 | const Debugging = false 12 | 13 | const noWordRating = 0.4 14 | 15 | // Rank returns a slice of probabilities indexed by category. 16 | func (b *Bayes) Rank(tz tokenizer.Tokenizer) []float64 { 17 | // Initialize ratings map. 18 | ratings := make([][]float64, len(b.Categories)) 19 | var words []string 20 | if Debugging { 21 | words = make([]string, 0, 10) 22 | } 23 | for i := range b.Categories { 24 | ratings[i] = make([]float64, 0, 10) 25 | } 26 | sumTotals := b.sumTotals 27 | for tz.Next() { 28 | tokenCounts, ok := b.Tokens[tz.Token()] 29 | if Debugging { 30 | words = append(words, tz.Token()) 31 | } 32 | if !ok { 33 | // Never seen this word. 34 | for i := range b.Categories { 35 | ratings[i] = append(ratings[i], noWordRating) 36 | } 37 | continue 38 | } 39 | // Calculate tokens sum. 40 | var sumToken float64 41 | for _, v := range tokenCounts { 42 | sumToken += float64(v) 43 | } 44 | 45 | for catIndex, catTotal := range b.Totals { 46 | if catIndex >= len(tokenCounts) { 47 | ratings[catIndex] = append(ratings[catIndex], 0.2) 48 | continue 49 | } 50 | cnt := tokenCounts[catIndex] 51 | if cnt == 0 { 52 | ratings[catIndex] = append(ratings[catIndex], 0.2) 53 | continue 54 | } 55 | thisProb := float64(cnt) / float64(catTotal) 56 | otherProb := (sumToken - float64(cnt)) / (sumTotals - float64(catTotal)) 57 | //rating := math.Log(thisProb) / math.Log(thisProb + otherProb) 58 | rating := thisProb / (thisProb + otherProb) 59 | if rating < 0.20 { 60 | rating = 0.20 61 | } else if rating > 0.70 { 62 | rating = 0.70 63 | } 64 | ratings[catIndex] = append(ratings[catIndex], rating) 65 | } 66 | } 67 | 68 | // Calculate ranks. 69 | ranks := make([]float64, len(ratings)) 70 | for catIndex, probs := range ratings { 71 | if Debugging { 72 | fmt.Printf("%s: \n", b.CategoryForIndex(catIndex)) 73 | for i, v := range probs { 74 | fmt.Printf("\t%f\t%s\n", v, words[i]) 75 | } 76 | } 77 | // Get rid of 1 highest and 1 lowest rating, 78 | // then leave only 10 lowest and 10 highest results. 79 | if len(probs) > 6 { 80 | sort.Float64s(probs) 81 | probs = probs[2 : len(probs)-2] 82 | if len(probs) > 80 { 83 | probs = append(probs[:40], probs[len(probs)-40:]...) 84 | } 85 | } 86 | 87 | nth := 1.0 / float64(len(probs)) 88 | p := 1.0 89 | q := 1.0 90 | for _, v := range probs { 91 | p *= 1.0 - v 92 | q *= v 93 | } 94 | p = 1.0 - math.Pow(p, nth) 95 | q = 1.0 - math.Pow(q, nth) 96 | s := (p - q) / (p + q) 97 | ranks[catIndex] = (1 + s) / 2 98 | } 99 | return ranks 100 | } 101 | 102 | func (b *Bayes) Classify(tz tokenizer.Tokenizer) (category string, score float64) { 103 | ranks := b.Rank(tz) 104 | index := 0 105 | // Find highest rank. 106 | for i, r := range ranks { 107 | if r > score { 108 | score = r 109 | index = i 110 | } 111 | } 112 | category = b.CategoryForIndex(index) 113 | return 114 | } 115 | -------------------------------------------------------------------------------- /bayes/trainer.go: -------------------------------------------------------------------------------- 1 | package bayes 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | "io/ioutil" 7 | "log" 8 | "os" 9 | "path/filepath" 10 | 11 | "github.com/coding-robots/goiwl/tokenizer" 12 | ) 13 | 14 | func (b *Bayes) trainToken(catIndex int, word string) { 15 | // Increment totals. 16 | b.Totals[catIndex]++ 17 | // Increment tokens. 18 | t, ok := b.Tokens[word] 19 | if !ok { 20 | t = make([]uint32, catIndex+1) 21 | b.Tokens[word] = t 22 | } else if len(t) <= catIndex { 23 | tmp := make([]uint32, catIndex+1) 24 | copy(tmp, t) 25 | t = tmp 26 | b.Tokens[word] = t 27 | } 28 | t[catIndex]++ 29 | } 30 | 31 | func (b *Bayes) RemoveExtremes() { 32 | cutoff := len(b.Categories) - len(b.Categories)/5 33 | for i, token := range b.Tokens { 34 | // Count zeros. 35 | zeros := 0 36 | for _, n := range token { 37 | if n == 0 { 38 | zeros++ 39 | } 40 | } 41 | if zeros >= cutoff { 42 | delete(b.Tokens, i) 43 | // ...but leave totals as is. 44 | } 45 | } 46 | } 47 | 48 | func (b *Bayes) Train(category string, tz tokenizer.Tokenizer) { 49 | catIndex := b.categoryIndex(category) 50 | for tz.Next() { 51 | b.trainToken(catIndex, tz.Token()) 52 | } 53 | } 54 | 55 | func (b *Bayes) TrainFile(category string, filename string) error { 56 | text, err := ioutil.ReadFile(filename) 57 | if err != nil { 58 | return err 59 | } 60 | b.Train(category, tokenizer.WordsSpecials(string(text))) 61 | return nil 62 | } 63 | 64 | func (b *Bayes) trainAuthorDir(dir string) error { 65 | author := filepath.Base(dir) 66 | files, err := filepath.Glob(filepath.Join(dir, "*.txt")) 67 | if err != nil { 68 | return err 69 | } 70 | if files == nil { 71 | return fmt.Errorf("No *.txt files found in %s", dir) 72 | } 73 | for _, f := range files { 74 | log.Printf("Training as %s file %s", author, f) 75 | if err := b.TrainFile(author, f); err != nil { 76 | return err 77 | } 78 | } 79 | return nil 80 | } 81 | 82 | // TrainDirs trains the classifier on the directory contents. 83 | // The directory must contain one directory per author, which 84 | // must contain texts to train on in "*.txt" files. 85 | // 86 | // Example layout: 87 | // 88 | // train-data\ 89 | // Conan Doyle\ 90 | // holmes.txt 91 | // lost-world.txt 92 | // Christie\ 93 | // poirot.txt 94 | // marple.txt 95 | // 96 | func (b *Bayes) TrainDirs(dir string) error { 97 | d, err := os.Open(dir) 98 | if err != nil { 99 | return err 100 | } 101 | defer d.Close() 102 | for { 103 | fi, err := d.Readdir(1) 104 | if err != nil { 105 | if err == io.EOF { 106 | return nil 107 | } 108 | return err 109 | } 110 | if !fi[0].IsDir() { 111 | continue 112 | } 113 | if err := b.trainAuthorDir(filepath.Join(dir, fi[0].Name())); err != nil { 114 | return err 115 | } 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/coding-robots/goiwl 2 | 3 | go 1.18 4 | -------------------------------------------------------------------------------- /iwlserve/api.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "encoding/json" 5 | "log" 6 | "net/http" 7 | ) 8 | 9 | type apiResponse struct { 10 | Writer string `json:"writer"` 11 | Id string `json:"id"` 12 | WriterLink string `json:"writer_link"` 13 | BadgeLink string `json:"badge_link"` 14 | ShareLink string `json:"share_link"` 15 | } 16 | 17 | type apiErrResponse struct { 18 | Error string `json:"error"` 19 | } 20 | 21 | func apiError(w http.ResponseWriter, errDesc string) { 22 | data, err := json.Marshal(&apiErrResponse{errDesc}) 23 | if err != nil { 24 | http.Error(w, "server error", http.StatusInternalServerError) 25 | log.Printf("api error: %s", err) 26 | return 27 | } 28 | _, err = w.Write(data) 29 | if err != nil { 30 | log.Printf("api error: %s", err) 31 | } 32 | } 33 | 34 | func apiHandler(w http.ResponseWriter, r *http.Request) { 35 | if r.Method != "POST" { 36 | http.Error(w, "expecting POST request", http.StatusBadRequest) 37 | return 38 | } 39 | // "client_id" is required but currently unused. 40 | if r.FormValue("client_id") == "" { 41 | apiError(w, "missing required argument 'client_id'") 42 | return 43 | } 44 | // "permalink" is required but currently unused. 45 | if r.FormValue("permalink") == "" { 46 | apiError(w, "missing required argument 'permalink'") 47 | return 48 | } 49 | // XXX "function" argument no longer supported. 50 | 51 | author, err := analyze(r.FormValue("text")) 52 | if err != nil { 53 | apiError(w, err.Error()) 54 | return 55 | } 56 | resp := &apiResponse{ 57 | Writer: author, 58 | Id: crcByAuthor[author], 59 | WriterLink: getAuthorURL(siteBaseURL, author), 60 | BadgeLink: getBadgeURL(siteBaseURL, author), 61 | ShareLink: getShareURL(siteBaseURL, author), 62 | } 63 | data, err := json.Marshal(resp) 64 | if err != nil { 65 | http.Error(w, "server error", http.StatusInternalServerError) 66 | log.Printf("api error: %s", err) 67 | return 68 | } 69 | // Write response. 70 | _, err = w.Write(data) 71 | if err != nil { 72 | log.Printf("api error: %s", err) 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /iwlserve/authorinfo.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | // TODO(dchest): put this stuff in templates or JSON instead. 4 | import "html/template" 5 | 6 | type AuthorInfo struct { 7 | Name string 8 | PictureFile string 9 | PictureCopyright template.HTML 10 | WikiLink string 11 | Desc template.HTML 12 | } 13 | 14 | var authorInfos = []*AuthorInfo{ 15 | { 16 | "Agatha Christie", 17 | "agatha_christie.jpg", 18 | "", // Public domain, plaque 19 | "https://en.wikipedia.org/wiki/Agatha_Christie", 20 | `Dame Agatha Mary Clarissa Christie DBE (née Miller; 15 21 | September 1890 – 12 January 1976) was a British crime writer of novels, short 22 | stories, and plays. She also wrote romances under the name Mary Westmacott, but 23 | she is best remembered for her 66 detective novels and more than 15 short story 24 | collections (especially those featuring Hercule Poirot or Miss Jane Marple), and 25 | her successful West End plays. 26 |
27 | According to the Guinness Book of World Records, Christie is the 28 | best-selling novelist of all time. Her novels have sold roughly four billion 29 | copies, and her estate claims that her works rank third, after those of William 30 | Shakespeare and the Bible, as the most widely published books. According to 31 | Index Translationum, Christie is the most translated individual 32 | author, with only the collective corporate works of Walt Disney Productions 33 | surpassing her. Her books have been translated into at least 103 languages. 34 |
35 | Agatha Christie published two autobiographies: a posthumous one covering 36 | childhood to old age; and another chronicling several seasons of archaeological 37 | excavation in Syria and Iraq with her second husband, archaeologist Max 38 | Mallowan. The latter was published in 1946 with the title, Come, Tell Me 39 | How You Live. 40 |
41 | Christie's stage play The Mousetrap holds the record for the 42 | longest initial run: it opened at the Ambassadors Theatre in London on 25 43 | November 1952 and as of 2012 is still running after more than 24,600 44 | performances. In 1955, Christie was the first recipient of the Mystery Writers 45 | of America's highest honour, the Grand Master Award, and in the same year 46 | Witness for the Prosecution was given an Edgar Award by the MWA for Best Play. 47 | Many of her books and short stories have been filmed, some more than once 48 | (Murder on the Orient Express, Death on the Nile and 49 | 4.50 from Paddington for instance), and many have been adapted for 50 | television, radio, video games and comics.`, 51 | }, 52 | { 53 | "Anne Rice", 54 | "anne_rice.jpg", 55 | "", // Public domain, source: http://en.wikipedia.org/wiki/File:Anne_Rice.jpg 56 | "https://en.wikipedia.org/wiki/Anne_Rice", 57 | `Anne Rice (born Howard Allen Frances O'Brien; October 4, 1941) is a best-selling American author of metaphysical gothic fiction, Christian literature and erotica from New Orleans, Louisiana. Her books have sold nearly 100 million copies, making her one of the most widely read authors in modern history. 58 | 59 |
Bibliography: 60 |
99 | Clarke served in the Royal Air Force as a radar instructor and technician from 1941–1946. He proposed a satellite communication system in 1945 which won him the Franklin Institute Stuart Ballantine Gold Medal in 1963. He was the chairman of the British Interplanetary Society from 1947–1950 and again in 1953. 100 |
101 | Clarke emigrated to Sri Lanka in 1956 largely to pursue his interest in scuba diving; that year, he discovered the underwater ruins of the ancient Koneswaram temple in Trincomalee. He lived in Sri Lanka until his death. He was knighted by Queen Elizabeth II in 1998, and was awarded Sri Lanka's highest civil honour, Sri Lankabhimanya, in 2005.`, 102 | }, 103 | { 104 | "Arthur Conan Doyle", //TODO add more text to bio. 105 | "arthur_conan_doyle.jpg", 106 | "", // Public domain 107 | "https://en.wikipedia.org/wiki/Arthur_Conan_Doyle", 108 | `Sir Arthur Ignatius Conan Doyle DL (22 May 1859 – 7 July 1930) was a Scottish physician and writer, most noted for his stories about the detective Sherlock Holmes, generally considered a milestone in the field of crime fiction, and for the adventures of Professor Challenger. He was a prolific writer whose other works include science fiction stories, plays, romances, poetry, non-fiction and historical novels.`, 109 | }, 110 | { 111 | "Bram Stoker", //TODO add more text to bio. 112 | "bram_stoker.jpg", 113 | "", // Public domain 114 | "https://en.wikipedia.org/wiki/Bram_Stoker", 115 | `Abraham "Bram" Stoker (8 November 1847 – 20 April 1912) was an Irish novelist and short story writer, best known today for his 1897 Gothic novel Dracula. During his lifetime, he was better known as personal assistant of actor Henry Irving and business manager of the Lyceum Theatre in London, which Irving owned.`, 116 | }, 117 | { 118 | "Charles Dickens", 119 | "charles_dickens.jpg", 120 | "", // Public domain 121 | "https://en.wikipedia.org/wiki/Charles_Dickens", 122 | `Charles John Huffam Dickens (7 February 1812 – 9 June 1870) was an English writer and social critic who is generally regarded as the greatest novelist of the Victorian period and the creator of some of the world's most memorable fictional characters. During his lifetime Dickens' works enjoyed unprecedented popularity and fame, but it was in the twentieth century that his literary genius was fully recognized by critics and scholars. His novels and short stories continue to enjoy an enduring popularity among the general reading public. 123 |
124 | Dickens rocketed to fame with the 1836 serial publication of The Pickwick Papers. Within a few years he had become an international literary celebrity, celebrated for his humour, satire, and keen observation of character and society. His novels, most published in monthly or weekly instalments, pioneered the serial publication of narrative fiction, which became the dominant Victorian mode for novel publication. The instalment format allowed Dickens to evaluate his audience's reaction, and he often modified his plot and character development based on such feedback. 125 |
126 | Dickens was regarded as the 'literary colossus' of his age. His 1843 novella, A Christmas Carol, is one of the most influential works ever written, and it remains popular and continues to inspire adaptations in every artistic genre. His creative genius has been praised by fellow writers—from Leo Tolstoy to G. K. Chesterton and George Orwell—for its realism, comedy, prose style, unique characterisations, and social criticism. On the other hand Oscar Wilde, Henry James and Virginia Woolf complained of a lack of psychological depth, loose writing, and a vein of saccharine sentimentalism.`, 127 | }, 128 | { 129 | "Chuck Palahniuk", //TODO add more text to bio. 130 | "chuck_palahniuk.jpg", 131 | `Photo by AlexRan. CC-BY-SA`, 132 | "https://en.wikipedia.org/wiki/Chuck_Palahniuk", 133 | `Charles Michael "Chuck" Palahniuk (born February 21, 1962) is an American transgressional fiction novelist and freelance journalist. He is best known for the award-winning novel Fight Club, which was later made into a feature film. He maintains homes in the states of Oregon and Washington.`, 134 | }, 135 | { 136 | "Cory Doctorow", //TODO add more text to bio. 137 | "cory_doctorow.jpg", 138 | `Photo by null0. CC-BY-SA-2.0`, 139 | "https://en.wikipedia.org/wiki/Cory_Doctorow", 140 | `Cory Efram Doctorow (born July 17, 1971) is a Canadian-British blogger, journalist, and science fiction author who serves as co-editor of the weblog Boing Boing. He is an activist in favour of liberalising copyright laws and a proponent of the Creative Commons organization, using some of their licences for his books. Some common themes of his work include digital rights management, file sharing, and "post-scarcity" economics.`, 141 | }, 142 | { 143 | "Dan Brown", 144 | "dan_brown.jpg", 145 | `Photo by Philip Scalia. CC-BY-SA-3.0`, 146 | "https://en.wikipedia.org/wiki/Dan_Brown", 147 | `Dan Brown (born June 22, 1964) is an American author of thriller fiction, best known for the 2003 bestselling novel, The Da Vinci Code. Brown's novels, which are treasure hunts set in a 24-hour time period, feature the recurring themes of cryptography, keys, symbols, codes, and conspiracy theories. His books have been translated into over 40 languages, and as of 2009, sold over 80 million copies. Two of them, The Da Vinci Code and Angels & Demons, have been adapted into feature films. The former opened amid great controversy and poor reviews, while the latter did only slightly better with critics. 148 |
149 | Brown's novels that feature the lead character Robert Langdon also include historical themes and Christianity as recurring motifs, and as a result, have generated controversy. Brown states on his website that his books are not anti-Christian, though he is on a 'constant spiritual journey' himself, and says that his book The Da Vinci Code is simply "an entertaining story that promotes spiritual discussion and debate" and suggests that the book may be used "as a positive catalyst for introspection and exploration of our faith.`, 150 | }, 151 | { 152 | "Daniel Defoe", 153 | "daniel_defoe.jpg", 154 | "", // Public domain 155 | "https://en.wikipedia.org/wiki/Daniel_Defoe", 156 | `Daniel Defoe (ca. 1659–1661 to 24 April 1731), born Daniel Foe, was an English trader, writer, journalist, and pamphleteer, who gained fame for his novel Robinson Crusoe. Defoe is notable for being one of the earliest proponents of the novel, as he helped to popularise the form in Britain and along with others such as Richardson, is among the founders of the English novel. A prolific and versatile writer, he wrote more than 500 books, pamphlets and journals on various topics (including politics, crime, religion, marriage, psychology and the supernatural). He was also a pioneer of economic journalism.`, 157 | }, 158 | { 159 | "David Foster Wallace", 160 | "david_foster_wallace.jpg", 161 | `Photo by Steve Rhodes. CC-BY 2.0.`, 162 | "https://en.wikipedia.org/wiki/David_Foster_Wallace", 163 | `David Foster Wallace (February 21, 1962 – September 12, 2008) was an award-winning American author of novels, essays, and short stories, and a professor at Pomona College in Claremont, California. He was widely known for his 1996 novel Infinite Jest. In 2005, Time magazine included the novel in its list of the 100 best English-language novels from 1923 to the present. 164 |
165 | Los Angeles Times book editor David Ulin called Wallace "one of the most influential and innovative writers of the last 20 years". Wallace's unfinished novel, The Pale King, was published in 2011, and in 2012 was a finalist for the Pulitzer Prize.`, 166 | }, 167 | { 168 | "Douglas Adams", 169 | "douglas_adams.jpg", 170 | `Photo by Michael Hughes. CC-BY-SA-2.0`, 171 | "https://en.wikipedia.org/wiki/Douglas_Adams", 172 | `Douglas Noel Adams (11 March 1952 – 11 May 2001) was an English writer and dramatist. He is best known as the author of The Hitchhiker's Guide to the Galaxy, which started life in 1978 as a BBC radio comedy before developing into a "trilogy" of five books that sold over 15 million copies in his lifetime, a television series, several stage plays, comics, a computer game, and in 2005 a feature film. Adams's contribution to UK radio is commemorated in The Radio Academy's Hall of Fame. 173 |
174 | Adams also wrote Dirk Gently's Holistic Detective Agency (1987) and The Long Dark Tea-Time of the Soul (1988), and co-wrote The Meaning of Liff (1983), Last Chance to See (1990), and three stories for the television series Doctor Who. A posthumous collection of his work, including an unfinished novel, was published as The Salmon of Doubt in 2002. 175 |
176 | Adams became known as an advocate for environmental and conservation causes, and also as a lover of fast cars, cameras, and the Apple Macintosh. He was a staunch atheist, famously imagining a sentient puddle who wakes up one morning and thinks, "This is an interesting world I find myself in—an interesting hole I find myself in—fits me rather neatly, doesn't it? In fact it fits me staggeringly well, must have been made to have me in it!" Biologist Richard Dawkins dedicated his book, The God Delusion (2006), to Adams, writing on his death that, "Science has lost a friend, literature has lost a luminary, the mountain gorilla and the black rhino have lost a gallant defender."`, 177 | }, 178 | { 179 | "Edgar Allan Poe", 180 | "edgar_allan_poe.jpg", 181 | "", // Public domain 182 | "https://en.wikipedia.org/wiki/Edgar_Allan_Poe", 183 | `Edgar Allan Poe (born Edgar Poe; January 19, 1809 – October 7, 1849) was an American author, poet, editor and literary critic, considered part of the American Romantic Movement. Best known for his tales of mystery and the macabre, Poe was one of the earliest American practitioners of the short story and is considered the inventor of the detective fiction genre. He is further credited with contributing to the emerging genre of science fiction. He was the first well-known American writer to try to earn a living through writing alone, resulting in a financially difficult life and career. 184 |
185 | Poe and his works influenced literature in the United States and around the world, as well as in specialized fields, such as cosmology and cryptography. Poe and his work appear throughout popular culture in literature, music, films, and television. A number of his homes are dedicated museums today.`, 186 | }, 187 | { 188 | "Ernest Hemingway", 189 | "ernest_hemingway.jpg", 190 | "Photo by Lloyd Arnold. Public domain.", 191 | "https://en.wikipedia.org/wiki/Ernest_Hemingway", 192 | `Ernest Miller Hemingway (July 21, 1899 – July 2, 1961) was an American author and journalist. His economical and understated style had a strong influence on 20th-century fiction, while his life of adventure and his public image influenced later generations. Hemingway produced most of his work between the mid-1920s and the mid-1950s, and won the Nobel Prize in Literature in 1954. He published seven novels, six short story collections and two non-fiction works. Three novels, four collections of short stories and three non-fiction works were published posthumously. Many of these are considered classics of American literature. 193 |
194 | Hemingway was raised in Oak Park, Illinois. After high school he reported for a few months for The Kansas City Star, before leaving for the Italian front to enlist with the World War I ambulance drivers. In 1918, he was seriously wounded and returned home. His wartime experiences formed the basis for his novel A Farewell to Arms. In 1922, he married Hadley Richardson, the first of his four wives. The couple moved to Paris, where he worked as a foreign correspondent, and fell under the influence of the modernist writers and artists of the 1920s "Lost Generation" expatriate community. The Sun Also Rises, Hemingway's first novel, was published in 1926. 195 |
196 | After his 1927 divorce from Hadley Richardson, Hemingway married Pauline Pfeiffer. They divorced after he returned from the Spanish Civil War where he had acted as a journalist, and after which he wrote For Whom the Bell Tolls. Martha Gellhorn became his third wife in 1940. They separated when he met Mary Welsh in London during World War II; during which he was present at the Normandy Landings and liberation of Paris. 197 |
198 | Shortly after the publication of The Old Man and the Sea in 1952, Hemingway went on safari to Africa, where he was almost killed in a plane crash that left him in pain or ill-health for much of the rest of his life. Hemingway had permanent residences in Key West, Florida, and Cuba during the 1930s and 1940s, but in 1959 he moved from Cuba to Ketchum, Idaho, where he committed suicide in the summer of 1961.`, 199 | }, 200 | { 201 | "George Orwell", 202 | "george_orwell.jpg", 203 | "", // Public domain, anonymous photographer. 204 | "https://en.wikipedia.org/wiki/George_Orwell", 205 | `Eric Arthur Blair (25 June 1903 – 21 January 1950), better known by his pen name George Orwell, was an English novelist and journalist. His work is marked by keen intelligence and wit, a profound awareness of social injustice, an intense opposition to totalitarianism, a passion for clarity in language and a belief in democratic socialism. 206 |
207 | Considered perhaps the 20th century's best chronicler of English culture, Orwell wrote literary criticism, poetry, fiction and polemical journalism. He is best known for the dystopian novel Nineteen Eighty-Four (1949) and the allegorical novella Animal Farm (1945), which together have sold more copies than any two books by any other 20th-century author. His book Homage to Catalonia (1938), an account of his experiences in the Spanish Civil War, is widely acclaimed, as are his numerous essays on politics, literature, language and culture. In 2008, The Times ranked him second on a list of "The 50 greatest British writers since 1945". 208 |
209 | Orwell's influence on popular and political culture endures, and several of his neologisms, along with the term Orwellian — a byword for totalitarian or manipulative social practices — have entered the vernacular.`, 210 | }, 211 | { 212 | "Gertrude Stein", //TODO add more text to bio. 213 | "gertrude_stein.jpg", 214 | "", // Public domain. 215 | "https://en.wikipedia.org/wiki/Gertrude_Stein", 216 | `Gertrude Stein (February 3, 1874 – July 27, 1946) was an American writer, poet, and art collector who spent most of her life in France.`, 217 | }, 218 | { 219 | "H. G. Wells", //TODO mention his famous books in bio. 220 | "h_g_wells.jpg", 221 | "", // Public domain. 222 | "https://en.wikipedia.org/wiki/H._G._Wells", 223 | `Herbert George "H.G." Wells (21 September 1866 – 13 August 1946) was a British author, now best known for his work in the science fiction genre. He was also a prolific writer in many other genres, including contemporary novels, history, politics and social commentary, even writing text books and rules for war games. Together with Jules Verne and Hugo Gernsback, Wells has been referred to as "The Father of Science Fiction". 224 |
225 | Wells's earliest specialized training was in biology, and his thinking on ethical matters took place in a specifically and fundamentally Darwinian context. He was also from an early date an outspoken socialist, often (but not always, as the beginning of the First World War) sympathizing with pacifist views. His later works became increasingly political and didactic, and he sometimes indicated on official documents that his profession was that of "Journalist". Many of his novels, particularly those of his middle period (1900–1920), had nothing to do with science fiction. They described lower-middle class life (Kipps; The History of Mr Polly), and this work sometimes led Wells to be touted as a worthy successor to Charles Dickens.`, 226 | }, 227 | { 228 | "H. P. Lovecraft", 229 | "h_p_lovecraft.jpg", 230 | "", // Public domain, 1915 231 | "https://en.wikipedia.org/wiki/H._P._Lovecraft", 232 | `Howard Phillips Lovecraft (August 20, 1890 – March 15, 1937) — known as 233 | H. P. Lovecraft — was an American author of horror, fantasy and science fiction, 234 | especially the subgenre known as weird fiction. 235 |
236 | Lovecraft's guiding aesthetic and philosophical principle was what he termed 237 | "cosmicism" or "cosmic horror", the idea that life is incomprehensible to human 238 | minds and that the universe is fundamentally inimical to the interests of 239 | humankind. As such, his stories express a profound indifference to human beliefs 240 | and affairs. Lovecraft is best known for his Cthulhu Mythos story cycle and the 241 | Necronomicon, a fictional grimoire of magical rites and forbidden lore. 242 |
243 | Although Lovecraft's readership was limited during his lifetime, his reputation 244 | has grown over the decades, and he is now regarded as one of the most 245 | influential horror writers of the 20th century. According to Joyce Carol Oates, 246 | Lovecraft—as with Edgar Allan Poe in the 19th century—has exerted "an 247 | incalculable influence on succeeding generations of writers of horror fiction". 248 | Stephen King called Lovecraft "the twentieth century's greatest practitioner of 249 | the classic horror tale." King has even made it clear in his 250 | semi-autobiographical non-fiction book Danse Macabre that Lovecraft was 251 | responsible for King's own fascination with horror and the macabre, and was the 252 | single largest figure to influence his fiction writing. His stories have also 253 | been adapted into plays, films and games.`, 254 | }, 255 | { 256 | "Harry Harrison", //TODO add more text to bio. 257 | "harry_harrison.jpg", 258 | `Photo by Szymon Sokół. CC-BY-SA 3.0`, 259 | "https://en.wikipedia.org/wiki/Harry_Harrison", 260 | `Harry Harrison (born March 12, 1925) is an American science fiction author best known for his character the Stainless Steel Rat and the novel Make Room! Make Room! (1966), the basis for the film Soylent Green (1973). He is also (with Brian Aldiss) co-president of the Birmingham Science Fiction Group.`, 261 | }, 262 | { 263 | "Ian Fleming", 264 | "", // CC or public domain photos not found :( 265 | "", 266 | "https://en.wikipedia.org/wiki/Ian_Fleming", 267 | `Ian Lancaster Fleming (28 May 1908 – 12 August 1964) was an English author, journalist and Naval Intelligence Officer. Fleming is best known for creating the fictional spy James Bond and the series of twelve novels and nine short stories about the character. Fleming was from a wealthy family, connected to the merchant bank Robert Fleming & Co. and his father was MP for Henley from 1910 until his death on the Western Front in 1917. Educated at Eton, the Royal Military Academy, Sandhurst and the universities of Munich and Geneva, Fleming moved through a number of jobs before he started writing. 268 |
269 | The Bond books are among the biggest-selling series of fictional books of all time, having sold over 100 million copies worldwide. Fleming also wrote the children's story Chitty-Chitty-Bang-Bang and two works of non-fiction. While working in British Naval Intelligence during the Second World War, Fleming was involved in the planning stages of Operation Mincemeat and Operation Golden Eye, the former of which was successfully carried out. Fleming was also involved in the planning and overseeing of two active service units, 30 Assault Unit and T-Force. 270 |
271 | His experiences of the people he met during his wartime service provided much of the background and detail of the Bond novels and his career as a journalist added colour and depth to the stories. In 2008, The Times ranked Fleming fourteenth on its list of "The 50 greatest British writers since 1945".`, 272 | }, 273 | { 274 | "Isaac Asimov", 275 | "isaac_asimov.jpg", 276 | "", // Public domain, see http://en.wikipedia.org/wiki/File:Isaac.Asimov01.jpg 277 | "https://en.wikipedia.org/wiki/Isaac_Asimov", 278 | `Isaac Asimov (born Isaak Yudovich Ozimov, c. January 2, 1920 – April 6, 1992) was an American author and professor of biochemistry at Boston University, best known for his works of science fiction and for his popular science books. Asimov was one of the most prolific writers of all time, having written or edited more than 500 books and an estimated 90,000 letters and postcards. His works have been published in all ten major categories of the Dewey Decimal System (although his only work in the 100s—which covers philosophy and psychology—was a foreword for The Humanist Way). 279 |
280 | Asimov is widely considered a master of hard science fiction and, along with Robert A. Heinlein and Arthur C. Clarke, he was considered one of the "Big Three" science fiction writers during his lifetime. Asimov's most famous work is the Foundation Series; his other major series are the Galactic Empire series and the Robot series, both of which he later tied into the same fictional universe as the Foundation Series to create a unified "future history" for his stories much like those pioneered by Robert A. Heinlein and previously produced by Cordwainer Smith and Poul Anderson. He wrote many short stories, among them Nightfall, which in 1964 was voted by the Science Fiction Writers of America the best short science fiction story of all time. Asimov wrote the Lucky Starr series of juvenile science-fiction novels using the pen name Paul French. 281 |
282 | The prolific Asimov also wrote mysteries and fantasy, as well as much non-fiction. Most of his popular science books explain scientific concepts in a historical way, going as far back as possible to a time when the science in question was at its simplest stage. He often provides nationalities, birth dates, and death dates for the scientists he mentions, as well as etymologies and pronunciation guides for technical terms. Examples include Guide to Science, the three volume set Understanding Physics, Asimov's Chronology of Science and Discovery, as well as works on astronomy, mathematics, the Bible, William Shakespeare's writing and chemistry. 283 |
284 | The asteroid 5020 Asimov, a crater on the planet Mars, a Brooklyn, New York elementary school, and one Isaac Asimov literary award are named in his honor.`, 285 | }, 286 | { 287 | "J. D. Salinger", 288 | "", // CC or public domain photos not found :( 289 | "", 290 | "http://en.wikipedia.org/wiki/J._D._Salinger", 291 | `Jerome David "J. D." Salinger (January 1, 1919 – January 27, 2010) was an American author, best known for his only novel, The Catcher in the Rye (1951), and his reclusive nature. His last original published work was in 1965; he gave his last interview in 1980.`, 292 | }, 293 | { 294 | "J. K. Rowling", 295 | "j_k_rowling.jpg", 296 | `Photo by Daniel Ogren. CC-BY 2.0`, 297 | "https://en.wikipedia.org/wiki/J._K._Rowling", 298 | `Joanne "Jo" Rowling, (born 31 July 1965), known as J. K. Rowling, is a British novelist, best known as the author of the Harry Potter fantasy series. The Potter books have gained worldwide attention, won multiple awards, sold more than 400 million copies to become the best-selling book series in history and been the basis for a popular series of films, in which Rowling had overall approval on the scripts as well as maintaining creative control by serving as a producer on the final installment. Rowling conceived the idea for the series on a train trip from Manchester to London in 1990. 299 |
300 | Rowling progressed from living on social security to multi-millionaire status within five years. As of March 2011, when its latest world billionaires list was published, Forbes estimated Rowling's net worth to be US$1 billion. The 2008 Sunday Times Rich List estimated Rowling's fortune at £560 million ($798 million), ranking her as the twelfth richest woman in the United Kingdom. Forbes ranked Rowling as the forty-eighth most powerful celebrity of 2007, and Time magazine named her as a runner-up for its 2007 Person of the Year, noting the social, moral, and political inspiration she has given her fans. In October 2010, J. K. Rowling was named 'Most Influential Woman in Britain' by leading magazine editors. She has become a notable philanthropist.`, 301 | }, 302 | { 303 | "J. R. R. Tolkien", 304 | "j_r_r_tolkien.jpg", 305 | "", // Public domain, 1916. 306 | "https://en.wikipedia.org/wiki/J._R._R._Tolkien", 307 | `John Ronald Reuel Tolkien, CBE (3 January 1892 – 2 September 1973) was an English writer, poet, philologist, and university professor, best known as the author of the classic high fantasy works The Hobbit, The Lord of the Rings, and The Silmarillion. 308 |
309 | Tolkien was Rawlinson and Bosworth Professor of Anglo-Saxon at Pembroke College, Oxford, from 1925 to 1945 and Merton Professor of English Language and Literature there from 1945 to 1959. He was a close friend of C. S. Lewis — they were both members of the informal literary discussion group known as the Inklings. Tolkien was appointed a Commander of the Order of the British Empire by Queen Elizabeth II on 28 March 1972. 310 |
311 | After his death, Tolkien's son Christopher published a series of works based on his father's extensive notes and unpublished manuscripts, including The Silmarillion. These, together with The Hobbit and The Lord of the Rings form a connected body of tales, poems, fictional histories, invented languages, and literary essays about a fantasy world called Arda, and Middle-earth within it. Between 1951 and 1955, Tolkien applied the term legendarium to the larger part of these writings. 312 |
313 | While many other authors had published works of fantasy before Tolkien, the great success of The Hobbit and The Lord of the Rings led directly to a popular resurgence of the genre. This has caused Tolkien to be popularly identified as the "father" of modern fantasy literature. In 2008, The Times ranked him sixth on a list of "The 50 greatest British writers since 1945". Forbes ranked him the 5th top-earning dead celebrity in 2009.`, 314 | }, 315 | { 316 | "Jack London", 317 | "jack_london.jpg", 318 | "", // Public domain, 1905 319 | "https://en.wikipedia.org/wiki/Jack_London", 320 | `John Griffith "Jack" London (born John Griffith Chaney, January 12, 1876 – November 22, 1916) was an American author, journalist, and social activist. He was a pioneer in the then-burgeoning world of commercial magazine fiction and was one of the first fiction writers to obtain worldwide celebrity and a large fortune from his fiction alone. He is best remembered as the author of Call of the Wild and White Fang, both set in the Klondike Gold Rush. He also wrote of the South Pacific in such stories as "The Pearls of Parlay" and "The Heathen", and of the San Francisco Bay area in The Sea Wolf. 321 |
322 | London was a passionate advocate of unionization, socialism, and the rights of workers and wrote several powerful works dealing with these topics such as his dystopian novel, The Iron Heel and his non-fiction exposé, The People of the Abyss.`, 323 | }, 324 | { 325 | "James Fenimore Cooper", 326 | "james_fenimore_cooper.jpg", 327 | "", // Public domain. 328 | "https://en.wikipedia.org/wiki/James_Fenimore_Cooper", 329 | `James Fenimore Cooper (September 15, 1789 – September 14, 1851) was a prolific and popular American writer of the early 19th century. He is best remembered as a novelist who wrote numerous sea-stories and the historical novels known as the Leatherstocking Tales, featuring frontiersman Natty Bumppo. Among his most famous works is the Romantic novel The Last of the Mohicans, often regarded as his masterpiece.`, 330 | }, 331 | { 332 | "James Joyce", 333 | "james_joyce.jpg", 334 | "", // Public domain, 1915. 335 | "https://en.wikipedia.org/wiki/James_Joyce", 336 | `James Augustine Aloysius Joyce (2 February 1882 – 13 January 1941) was an Irish novelist and poet, considered to be one of the most influential writers in the modernist avant-garde of the early 20th century. 337 |
338 | Joyce is best known for Ulysses (1922), a landmark work in which the episodes of Homer's Odyssey are paralleled in an array of contrasting literary styles, perhaps most prominently the stream of consciousness technique he perfected. Other major works are the short-story collection Dubliners (1914), and the novels A Portrait of the Artist as a Young Man (1916) and Finnegans Wake (1939). His complete oeuvre includes three books of poetry, a play, occasional journalism, and his published letters.`, 339 | }, 340 | { 341 | "Jane Austen", 342 | "jane_austen.jpg", 343 | "", // Public domain. 344 | "https://en.wikipedia.org/wiki/Jane_Austen", 345 | `Jane Austen (16 December 1775 – 18 July 1817) was an English novelist whose works of romantic fiction, set among the landed gentry, earned her a place as one of the most widely read writers in English literature. Her realism and biting social commentary has gained her historical importance among scholars and critics. 346 |
347 | Austen lived her entire life as part of a close-knit family located on the lower fringes of the English landed gentry. She was educated primarily by her father and older brothers as well as through her own reading. The steadfast support of her family was critical to her development as a professional writer. Her artistic apprenticeship lasted from her teenage years into her thirties. During this period, she experimented with various literary forms, including the epistolary novel which she tried then abandoned, and wrote and extensively revised three major novels and began a fourth. From 1811 until 1816, with the release of Sense and Sensibility (1811), Pride and Prejudice (1813), Mansfield Park (1814) and Emma (1816), she achieved success as a published writer. She wrote two additional novels, Northanger Abbey and Persuasion, both published posthumously in 1818, and began a third, which was eventually titled Sanditon, but died before completing it. 348 |
349 | Austen's works critique the novels of sensibility of the second half of the 18th century and are part of the transition to 19th-century realism. Her plots, though fundamentally comic, highlight the dependence of women on marriage to secure social standing and economic security. Her work brought her little personal fame and only a few positive reviews during her lifetime, but the publication in 1869 of her nephew's A Memoir of Jane Austen introduced her to a wider public, and by the 1940s she had become widely accepted in academia as a great English writer. The second half of the 20th century saw a proliferation of Austen scholarship and the emergence of a Janeite fan culture.`, 350 | }, 351 | { 352 | "Jonathan Swift", 353 | "jonathan_swift.jpg", 354 | "", // Public domain. 355 | "https://en.wikipedia.org/wiki/Jonathan_Swift", 356 | `Jonathan Swift (30 November 1667 – 19 October 1745) was an Anglo-Irish satirist, essayist, political pamphleteer (first for the Whigs, then for the Tories), poet and cleric who became Dean of St. Patrick's Cathedral, Dublin. 357 |
358 | He is remembered for works such as Gulliver's Travels, A Modest Proposal, A Journal to Stella, Drapier's Letters, The Battle of the Books, An Argument Against Abolishing Christianity, and A Tale of a Tub. Swift is probably the foremost prose satirist in the English language, and is less well known for his poetry. Swift originally published all of his works under pseudonyms, such as Lemuel Gulliver, Isaac Bickerstaff, M.B. Drapier, or anonymously. He is also known for being a master of two styles of satire: the Horatian and Juvenalian styles.`, 359 | }, 360 | { 361 | "Kurt Vonnegut", 362 | "", // No image. 363 | "", 364 | "https://en.wikipedia.org/wiki/Kurt_Vonnegut", 365 | `Kurt Vonnegut, Jr. (November 11, 1922 – April 11, 2007) was a 20th century American writer. His works such as Cat's Cradle (1963), Slaughterhouse-Five (1969), and Breakfast of Champions (1973) blend satire, gallows humor, and science fiction. As a citizen he was a lifelong supporter of the American Civil Liberties Union and a critical leftist intellectual. He was known for his humanist beliefs and was honorary president of the American Humanist Association.`, 366 | }, 367 | { 368 | "L. Frank Baum", 369 | "l_frank_baum.jpg", 370 | "", // Public domain, 1911. 371 | "https://en.wikipedia.org/wiki/L._Frank_Baum", 372 | `Lyman "L." Frank Baum (May 15, 1856 – May 6, 1919) was an American author of children's books, best known for writing The Wonderful Wizard of Oz. He wrote thirteen novel sequels, nine other fantasy novels, and a host of other works (55 novels in total, plus four "lost" novels, 82 short stories, over 200 poems, an unknown number of scripts, and many miscellaneous writings), and made numerous attempts to bring his works to the stage and screen.`, 373 | }, 374 | { 375 | "Leo Tolstoy", 376 | "leo_tolstoy.jpg", 377 | "", // Public domain, 1908 378 | "https://en.wikipedia.org/wiki/Leo_Tolstoy", 379 | `Leo Tolstoy, was a Russian writer who is regarded as one of the greatest authors of all time. 380 | 381 | Born to an aristocratic Russian family in 1828, he is best known for the novels War and Peace (1869) and Anna Karenina (1877), often cited as pinnacles of realist fiction. He first achieved literary acclaim in his twenties with his semi-autobiographical trilogy, Childhood, Boyhood, and Youth (1852–1856), and Sevastopol Sketches (1855), based upon his experiences in the Crimean War. Tolstoy's fiction includes dozens of short stories and several novellas such as The Death of Ivan Ilyich, Family Happiness, and Hadji Murad. He also wrote plays and numerous philosophical essays. 382 | 383 | In the 1870s Tolstoy experienced a profound moral crisis, followed by what he regarded as an equally profound spiritual awakening, as outlined in his non-fiction work A Confession. His literal interpretation of the ethical teachings of Jesus, centering on the Sermon on the Mount, caused him to become a fervent Christian anarchist and pacifist. Tolstoy's ideas on nonviolent resistance, expressed in such works as The Kingdom of God Is Within You, were to have a profound impact on such pivotal 20th-century figures as Mohandas Gandhi, Martin Luther King, Jr., and James Bevel. Tolstoy also became a dedicated advocate of Georgism, the economic philosophy of Henry George, which he incorporated into his writing, particularly Resurrection.`, 384 | }, 385 | { 386 | "Lewis Carroll", 387 | "lewis_carroll.jpg", 388 | "", // Public domain, 1898 389 | "https://en.wikipedia.org/wiki/Lewis_Carroll", 390 | `Charles Lutwidge Dodgson (27 January 1832 – 14 January 1898), better known by the pseudonym Lewis Carroll, was an English author, mathematician, logician, Anglican deacon and photographer. His most famous writings are Alice's Adventures in Wonderland and its sequel Through the Looking-Glass, as well as the poems "The Hunting of the Snark" and "Jabberwocky", all examples of the genre of literary nonsense. He is noted for his facility at word play, logic, and fantasy.`, 391 | }, 392 | { 393 | "Margaret Atwood", 394 | "margaret_atwood.jpg", 395 | "Photo by Vanwaffle. CC-BY-SA 3.0", 396 | "https://en.wikipedia.org/wiki/Margaret_Atwood", 397 | `Margaret Eleanor Atwood, CC OOnt FRSC (born November 18, 1939) is a Canadian poet, novelist, literary critic, essayist, and environmental activist. She is among the most-honored authors of fiction in recent history. She is a winner of the Arthur C. Clarke Award and Prince of Asturias award for Literature, has been shortlisted for the Booker Prize five times, winning once, and has been a finalist for the Governor General's Award seven times, winning twice. 398 |
399 | While she is best known for her work as a novelist, she is also a poet, having published 15 books of poetry to date. Many of her poems have been inspired by myths and fairy tales, which have been interests of hers from an early age. Atwood has published short stories in Tamarack Review, Alphabet, Harper's, CBC Anthology, Ms., Saturday Night, and many other magazines. She has also published four collections of stories and three collections of unclassifiable short prose works.`, 400 | }, 401 | { 402 | "Margaret Mitchell", 403 | "margaret_mitchell.jpg", 404 | "", // Public domain 405 | "https://en.wikipedia.org/wiki/Margaret_Mitchell", 406 | `Margaret Munnerlyn Mitchell (November 8, 1900 – August 16, 1949) was an American author and journalist. One novel by Mitchell was published during her lifetime, the American Civil War-era novel, Gone with the Wind. For it she won the National Book Award for Most Distinguished Novel of 1936 and the Pulitzer Prize for Fiction in 1937. 407 |
408 | In more recent years, a collection of Mitchell's girlhood writings and a novella she wrote as a teenager, Lost Laysen, have been published. A collection of articles written by Mitchell for The Atlanta Journal was republished in book form.`, 409 | }, 410 | { 411 | "Mario Puzo", 412 | "", // No free image. 413 | "", 414 | "https://en.wikipedia.org/wiki/Mario_Puzo", 415 | `Mario Gianluigi Puzo (October 15, 1920 – July 2, 1999) was an Italian American author and screenwriter, known for his novels about the Mafia, including The Godfather (1969), which he later co-adapted into a film by Francis Ford Coppola. He won the Academy Award for Best Adapted Screenplay in both 1972 and 1974.`, 416 | }, 417 | { 418 | "Mark Twain", 419 | "mark_twain.jpg", 420 | "", // Public domain 421 | "https://en.wikipedia.org/wiki/Mark_Twain", 422 | `Samuel Langhorne Clemens (November 30, 1835 – April 21, 1910), better known by his pen name Mark Twain, was an American author and humorist. He is most noted for his novels, The Adventures of Tom Sawyer (1876), and its sequel, Adventures of Huckleberry Finn (1885), the latter often called "the Great American Novel." 423 |
424 | Twain grew up in Hannibal, Missouri, which would later provide the setting for Huckleberry Finn and Tom Sawyer. He apprenticed with a printer. He also worked as a typesetter and contributed articles to his older brother Orion's newspaper. After toiling as a printer in various cities, he became a master riverboat pilot on the Mississippi River, before heading west to join Orion. He was a failure at gold mining, so he next turned to journalism. While a reporter, he wrote a humorous story, "The Celebrated Jumping Frog of Calaveras County", which became very popular and brought nationwide attention. His travelogues were also well-received. Twain had found his calling. 425 |
426 | He achieved great success as a writer and public speaker. His wit and satire earned praise from critics and peers, and he was a friend to presidents, artists, industrialists, and European royalty. 427 |
428 | He lacked financial acumen, and, though he made a great deal of money from his writings and lectures, he squandered it on various ventures, in particular the Paige Compositor, and was forced to declare bankruptcy. With the help of Henry Huttleston Rogers he eventually overcame his financial troubles. Twain worked hard to ensure that all of his creditors were paid in full, even though his bankruptcy had relieved him of the legal responsibility. 429 |
430 | He was lauded as the "greatest American humorist of his age," and William Faulkner called Twain "the father of American literature."`, 431 | }, 432 | { 433 | "Mary Shelley", 434 | "mary_shelley.jpg", 435 | "", // Public domain 436 | "https://en.wikipedia.org/wiki/Mary_Shelley", 437 | `Mary Shelley (née Mary Wollstonecraft Godwin; 30 August 1797 – 1 February 1851) was an English novelist, short story writer, dramatist, essayist, biographer, and travel writer, best known for her Gothic novel Frankenstein: or, The Modern Prometheus (1818). She also edited and promoted the works of her husband, the Romantic poet and philosopher Percy Bysshe Shelley. Her father was the political philosopher William Godwin, and her mother was the Philosopher and feminist Mary Wollstonecraft.`, 438 | }, 439 | { 440 | "Neil Gaiman", 441 | "neil_gaiman.jpg", 442 | `Photo by Kyle Cassidy. CC-BY-SA 3.0`, 443 | "https://en.wikipedia.org/wiki/Neil_Gaiman", 444 | `Neil Richard Gaiman (born 10 November 1960) is an English author of short fiction, novels, comic books, graphic novels, audio theatre and films. His notable works include the comic book series The Sandman and novels Stardust, American Gods, Coraline, and The Graveyard Book. He has won numerous awards, including Hugo, Nebula, Bram Stoker, Newbery Medal, and Carnegie Medal in Literature. He is the first author to win both the Newbery and the Carnegie medals for the same work.`, 445 | }, 446 | { 447 | "Oscar Wilde", 448 | "oscar_wilde.jpg", 449 | "", // Public domain 450 | "https://en.wikipedia.org/wiki/Oscar_Wilde", 451 | `Oscar Fingal O'Flahertie Wills Wilde (16 October 1854 – 30 November 1900) was an Irish writer and poet. After writing in different forms throughout the 1880s, he became one of London's most popular playwrights in the early 1890s. Today he is remembered for his epigrams and plays, and the circumstances of his imprisonment which was followed by his early death.`, 452 | }, 453 | { 454 | "P. G. Wodehouse", 455 | "p_g_wodehouse.jpg", 456 | "", // Public domain 457 | "https://en.wikipedia.org/wiki/P._G._Wodehouse", 458 | `Sir Pelham Grenville Wodehouse, KBE (15 October 1881 – 14 February 1975) was an English humorist, whose body of work includes novels, short stories, plays, poems, song lyrics and numerous pieces of journalism. He enjoyed enormous popular success during a career that lasted more than seventy years and his many writings continue to be widely read. Despite the political and social upheavals that occurred during his life, much of which was spent in France and the United States, Wodehouse's main canvas remained that of a pre- and post-World War I English upper class society, reflecting his birth, education and youthful writing career. 459 |
460 | An acknowledged master of English prose, Wodehouse has been admired both by contemporaries such as Hilaire Belloc, Evelyn Waugh and Rudyard Kipling and by recent writers such as Stephen Fry, Douglas Adams, J. K. Rowling, and John Le Carré. 461 |
462 | Best known today for the Jeeves and Blandings Castle novels and short stories, Wodehouse was also a playwright and lyricist who was part author and writer of 15 plays and of 250 lyrics for some 30 musical comedies, many of them produced in collaboration with Jerome Kern and Guy Bolton. He worked with Cole Porter on the musical Anything Goes (1934), wrote the lyrics for the hit song "Bill" in Kern's Show Boat (1927), wrote lyrics to Sigmund Romberg's music for the Gershwin – Romberg musical Rosalie (1928) and collaborated with Rudolf Friml on a musical version of The Three Musketeers (1928). He is in the Songwriters Hall of Fame.`, 463 | }, 464 | { 465 | "Ray Bradbury", 466 | "ray_bradbury.jpg", 467 | `Photo by Alan Light. CC-BY 2.0`, 468 | "https://en.wikipedia.org/wiki/Ray_Bradbury", 469 | `Ray Douglas Bradbury (August 22, 1920 – June 5, 2012) was an American fantasy, science fiction, horror and mystery fiction writer. Best known for his dystopian novel Fahrenheit 451 (1953) and for the science fiction and horror stories gathered together as The Martian Chronicles (1950) and The Illustrated Man (1951), Bradbury was one of the most celebrated 20th-century American writers. Many of Bradbury's works have been adapted into comic books, television shows and films.`, 470 | }, 471 | { 472 | "Raymond Chandler", 473 | "", // No free photo 474 | "", 475 | "https://en.wikipedia.org/wiki/Raymond_Chandler", 476 | `Raymond Thornton Chandler (July 23, 1888 – March 26, 1959) was an American novelist and screenwriter. 477 |
478 | In 1932, at age forty-four, Raymond Chandler decided to become a detective fiction writer after losing his job as an oil company executive during the Depression. His first short story, "Blackmailers Don't Shoot", was published in 1933 in Black Mask, a popular pulp magazine. His first novel, The Big Sleep, was published in 1939. In addition to his short stories, Chandler published just seven full novels during his lifetime (though an eighth in progress at his death was completed by Robert B. Parker). All but Playback have been realized into motion pictures, some several times. In the year before he died, he was elected president of the Mystery Writers of America. 479 |
480 | Chandler had an immense stylistic influence on American popular literature, and is considered by many to be a founder, along with Dashiell Hammett, James M. Cain and other Black Mask writers, of the hard-boiled school of detective fiction. His protagonist, Philip Marlowe, along with Hammett's Sam Spade, is considered by some to be synonymous with "private detective," both having been played on screen by Humphrey Bogart, whom many considered to be the quintessential Marlowe.`, 481 | }, 482 | { 483 | "Robert Louis Stevenson", 484 | "robert_louis_stevenson.jpg", 485 | "", // Public domain 486 | "https://en.wikipedia.org/wiki/Robert_Louis_Stevenson", 487 | `Robert Louis Balfour Stevenson (13 November 1850 – 3 December 1894) was a Scottish novelist, poet, essayist, and travel writer. His most famous works are Treasure Island, Kidnapped, and Strange Case of Dr Jekyll and Mr Hyde. 488 |
489 | A literary celebrity during his lifetime, Stevenson now ranks among the 26 most translated authors in the world. His works have been admired by many other writers, including Jorge Luis Borges, Ernest Hemingway, Rudyard Kipling, Marcel Schwob, Vladimir Nabokov, J. M. Barrie, and G. K. Chesterton, who said of him that he "seemed to pick the right word up on the point of his pen, like a man playing spillikins."`, 490 | }, 491 | { 492 | "Rudyard Kipling", 493 | "rudyard_kipling.jpg", 494 | "", // Public domain, 1912 495 | "https://en.wikipedia.org/wiki/Rudyard_Kipling", 496 | `Joseph Rudyard Kipling (30 December 1865 – 18 January 1936) was an English short-story writer, poet, and novelist chiefly remembered for his tales and poems of British soldiers in India, and his tales for children. 497 |
498 | He was born in Bombay, in the Bombay Presidency of British India, and was taken by his family to England when he was five years old. Kipling is best known for his works of fiction, including The Jungle Book (a collection of stories which includes "Rikki-Tikki-Tavi"), Just So Stories (1902), Kim (1901) (a tale of adventure), many short stories, including "The Man Who Would Be King" (1888); and his poems, including "Mandalay" (1890), "Gunga Din" (1890), "The White Man's Burden" (1899) and "If—" (1910). He is regarded as a major "innovator in the art of the short story"; his children's books are enduring classics of children's literature; and his best works are said to exhibit "a versatile and luminous narrative gift". 499 |
500 | Kipling was one of the most popular writers in England, in both prose and verse, in the late 19th and early 20th centuries. Henry James said: "Kipling strikes me personally as the most complete man of genius (as distinct from fine intelligence) that I have ever known." In 1907 he was awarded the Nobel Prize in Literature, making him the first English-language writer to receive the prize, and to date he remains its youngest recipient. Among other honours, he was sounded out for the British Poet Laureateship and on several occasions for a knighthood, all of which he declined.`, 501 | }, 502 | { 503 | "Stephen King", 504 | "stephen_king.jpg", 505 | `Photo by Pinguino. CC-BY 2.0`, 506 | "https://en.wikipedia.org/wiki/Stephen_King", 507 | `Stephen Edwin King (born September 21, 1947) is an American author of contemporary horror, suspense, science fiction and fantasy. His books have sold more than 350 million copies and have been adapted into a number of feature films, television movies and comic books. King has published 50 novels, including seven under the pen-name of Richard Bachman, and five non-fiction books. He has written nearly two hundred short stories, most of which have been collected in nine collections of short fiction. Many of his stories are set in his home state of Maine. 508 |
509 | King has received Bram Stoker Awards, World Fantasy Awards, British Fantasy Society Awards, his novella The Way Station was a Nebula Award novelette nominee, and his short story "The Man in the Black Suit" received the O. Henry Award. In 2003, the National Book Foundation awarded him the Medal for Distinguished Contribution to American Letters. He has also received awards for his contribution to literature for his whole career, such as the World Fantasy Award for Life Achievement (2004), the Canadian Booksellers Association Lifetime Achievement Award (2007) and the Grand Master Award from the Mystery Writers of America (2007).`, 510 | }, 511 | { 512 | "Stephenie Meyer", 513 | "stephenie_meyer.jpg", 514 | `Photo by Gage Skidmore. CC-BY-SA 3.0`, 515 | "https://en.wikipedia.org/wiki/Stephenie_Meyer", 516 | `Stephenie Meyer (née Morgan; born December 24, 1973) is an American young adult author and producer, best known for her vampire romance series Twilight. The Twilight novels have gained worldwide recognition and sold over 100 million copies, with translations into 37 different languages. Meyer was the bestselling author of 2008 and 2009 in America, having sold over 29 million books in 2008, and 26.5 million books in 2009. Twilight was the best-selling book of 2008 in US bookstores. 517 |
518 | Meyer was ranked #49 on Time magazine's list of the "100 Most Influential People in 2008", and was included in the Forbes Celebrity 100 list of the world's most powerful celebrities in 2009, entering at #26. Her annual earnings exceeded $50 million. In 2010, Forbes ranked her as the #59 most powerful celebrity with annual earnings of $40 million.`, 519 | }, 520 | { 521 | "Ursula K. Le Guin", 522 | "ursula_k_le_guin.jpg", 523 | `Photo by Hajor. CC-BY-SA 1.0`, 524 | "https://en.wikipedia.org/wiki/Ursula_K._Le_Guin", 525 | `Ursula Kroeber Le Guin (born October 21, 1929) is an American author of novels, children's books, and short stories, mainly in the genres of fantasy and science fiction. She has also written poetry and essays. 526 | First published in the 1960s, her work has often depicted futuristic or imaginary worlds alternative to our own in politics, natural environment, gender, religion, sexuality and ethnography. 527 |
528 | She has won the Hugo Award, Nebula Award, Locus Award, and World Fantasy Award several times each.`, 529 | }, 530 | { 531 | "Vladimir Nabokov", 532 | "", // No free image 533 | "", 534 | "https://en.wikipedia.org/wiki/Vladimir_Nabokov", 535 | `Vladimir Vladimirovich Nabokov (Russian: Влади́мир Влади́мирович Набо́ков; 22 April 1899 – 2 July 1977) was a Russian-American novelist. Nabokov's first nine novels were in Russian. He then rose to international prominence as a writer of English prose. He also made serious contributions as a lepidopterist and chess composer. 536 |
537 | Nabokov's Lolita (1955) is his most famous novel, and often considered his finest work in English. It exhibits the love of intricate word play and synesthetic detail that characterised all his works. The novel was ranked at No. 4 in the list of the Modern Library 100 Best Novels. Pale Fire (1962) was ranked at No. 53 on the same list. His memoir, Speak, Memory, was listed No. 8 on the Modern Library nonfiction list. He was a finalist for the National Book Award for Fiction seven times, but never won it.`, 538 | }, 539 | { 540 | "William Gibson", 541 | "william_gibson.jpg", 542 | `Photo by Gonzo Bonzo. CC-BY-SA 2.0`, 543 | "https://en.wikipedia.org/wiki/William_Gibson", 544 | `William Ford Gibson (born March 17, 1948) is an American-Canadian speculative fiction novelist who has been called the "noir prophet" of the cyberpunk subgenre. Gibson coined the term "cyberspace" in his short story "Burning Chrome" (1982) and later popularized the concept in his debut novel, Neuromancer (1984). In envisaging cyberspace, Gibson created an iconography for the information age before the ubiquity of the Internet in the 1990s. He is also credited with predicting the rise of reality television and with establishing the conceptual foundations for the rapid growth of virtual environments such as video games and the World Wide Web. 545 |
546 | After expanding on Neuromancer with two more novels to complete the dystopic Sprawl trilogy, Gibson became an important author of another science fiction sub-genre—steampunk—with the 1990 alternate history novel The Difference Engine, written with Bruce Sterling. In the 1990s, he composed the Bridge trilogy of novels, which focused on sociological observations of near-future urban environments and late capitalism. His most recent novels—Pattern Recognition (2003), Spook Country (2007) and Zero History (2010)—are set in a contemporary world and have put his work onto mainstream bestseller lists for the first time. 547 |
548 | Gibson is one of the best-known North American science fiction writers, fêted by The Guardian in 1999 as "probably the most important novelist of the past two decades". Gibson has written more than twenty short stories and ten critically acclaimed novels (one in collaboration), and has contributed articles to several major publications and collaborated extensively with performance artists, filmmakers and musicians. His thought has been cited as an influence on science fiction authors, design, academia, cyberculture, and technology.`, 549 | }, 550 | { 551 | "William Shakespeare", 552 | "william_shakespeare.jpg", 553 | "", // Public domain, 1610 554 | "https://en.wikipedia.org/wiki/William_Shakespeare", 555 | `William Shakespeare (26 April 1564 (baptised) – 23 April 1616) was an English poet and playwright, widely regarded as the greatest writer in the English language and the world's pre-eminent dramatist. He is often called England's national poet and the "Bard of Avon". His extant works, including some collaborations, consist of about 38 plays, 154 sonnets, two long narrative poems, two epitaphs on a man named John Combe, one epitaph on Elias James, and several other poems. His plays have been translated into every major living language and are performed more often than those of any other playwright. 556 |
557 | Shakespeare was born and brought up in Stratford-upon-Avon. At the age of 18, he married Anne Hathaway, with whom he had three children: Susanna, and twins Hamnet and Judith. Between 1585 and 1592, he began a successful career in London as an actor, writer, and part owner of a playing company called the Lord Chamberlain's Men, later known as the King's Men. He appears to have retired to Stratford around 1613 at age 49, where he died three years later. Few records of Shakespeare's private life survive, and there has been considerable speculation about such matters as his physical appearance, sexuality, religious beliefs, and whether the works attributed to him were written by others. 558 |
559 | Shakespeare produced most of his known work between 1589 and 1613. His early plays were mainly comedies and histories, genres he raised to the peak of sophistication and artistry by the end of the 16th century. He then wrote mainly tragedies until about 1608, including Hamlet, King Lear, Othello, and Macbeth, considered some of the finest works in the English language. In his last phase, he wrote tragicomedies, also known as romances, and collaborated with other playwrights.`, 560 | }, 561 | } 562 | -------------------------------------------------------------------------------- /iwlserve/data/data.gobz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/data/data.gobz -------------------------------------------------------------------------------- /iwlserve/fs.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "embed" 4 | 5 | //go:embed static templates data 6 | var embeddedFS embed.FS 7 | -------------------------------------------------------------------------------- /iwlserve/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | "io/ioutil" 7 | "log" 8 | "os" 9 | "sort" 10 | "time" 11 | 12 | "github.com/coding-robots/goiwl/bayes" 13 | "github.com/coding-robots/goiwl/tokenizer" 14 | ) 15 | 16 | var ( 17 | serverAddr = flag.String("s", "", "HTTP service address and port (e.g. ':8080'). If empty, use FastCGI.") 18 | tryClassify = flag.Bool("try", false, "read input from stdin and classify it") 19 | 20 | classifier *bayes.Bayes 21 | 22 | siteBaseURL = "https://iwl.me" 23 | sitePrefix = "" 24 | ) 25 | 26 | func classifyStdin() { 27 | log.SetFlags(0) 28 | text, err := ioutil.ReadAll(os.Stdin) 29 | if err != nil { 30 | log.Fatalf("error reading stdin: %s", err) 31 | } 32 | t := tokenizer.WordsSpecials(string(text)) 33 | 34 | ranks := classifier.Rank(t) 35 | res := make([]string, len(ranks)) 36 | for i, v := range ranks { 37 | res[i] = fmt.Sprintf("%f\t%s", v, classifier.CategoryForIndex(i)) 38 | } 39 | sort.Strings(res) 40 | for _, s := range res { 41 | fmt.Println(s) 42 | } 43 | /* 44 | t = tokenizer.WordsSpecials(string(text)) 45 | author, rank := b.Classify(t) 46 | fmt.Printf("%s (%f)\n", author, rank) 47 | */ 48 | } 49 | 50 | func main() { 51 | flag.Parse() 52 | t := time.Now() 53 | var err error 54 | f, err := embeddedFS.Open("data/data.gobz") 55 | if err != nil { 56 | log.Fatal(err) 57 | } 58 | classifier, err = bayes.LoadReader(f) 59 | if err != nil { 60 | log.Fatalf("error loading data: %s", err) 61 | } 62 | f.Close() 63 | 64 | if *tryClassify { 65 | classifyStdin() 66 | return 67 | } 68 | if *serverAddr != "" { 69 | log.Printf("Loaded in %s\n", time.Now().Sub(t)) 70 | } 71 | Serve(*serverAddr) 72 | } 73 | -------------------------------------------------------------------------------- /iwlserve/paths.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "path" 4 | 5 | // authorNameToURLSafeName transforms author name to 6 | // URL-friendly format, for example 7 | // H. P. Lovecraft -> H._P._Lovecraft. 8 | func authorNameToURLSafeName(name string) string { 9 | s := []rune(name) 10 | for i, r := range s { 11 | if (r < 'A' || r > 'z') && r != '.' { 12 | s[i] = '_' 13 | } 14 | } 15 | return string(s) 16 | } 17 | 18 | func getBadgeURL(base string, author string) string { 19 | return base + path.Join("/", "b", crcByAuthor[author]) 20 | } 21 | 22 | func getShareURL(base string, author string) string { 23 | return base + path.Join("/", "s", crcByAuthor[author]) 24 | } 25 | 26 | func getShortAuthorURL(base string, author string) string { 27 | return base + path.Join("/", "w", crcByAuthor[author]) 28 | } 29 | 30 | func getAuthorURL(base string, author string) string { 31 | return base + path.Join("/", "writer", authorNameToURLSafeName(author)) 32 | } 33 | -------------------------------------------------------------------------------- /iwlserve/server.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "errors" 5 | "hash/crc32" 6 | "html/template" 7 | "log" 8 | "math/rand" 9 | "net/http" 10 | "net/http/fcgi" 11 | "path" 12 | "sort" 13 | "strconv" 14 | "unicode/utf8" 15 | 16 | "github.com/coding-robots/goiwl/tokenizer" 17 | ) 18 | 19 | const ( 20 | // Minimum text length in bytes for analysis. 21 | // If text has fewer bytes, the error is shown. 22 | MinTextLen = 200 23 | // Maximum text length in bytes for analysis. 24 | // If text has more bytes, it's cut, but on letter boundary, 25 | // not on byte boundary. 26 | MaxTextLen = 30000 27 | ) 28 | 29 | var ( 30 | templates *template.Template 31 | // Sorted authors names 32 | sortedAuthors []string 33 | // Maps CRC32 of author name to author name. 34 | authorByCrc map[string]string 35 | // Maps author name to CRC32 36 | crcByAuthor map[string]string 37 | // Maps author URL-friendly name to author name. 38 | authorByURLName map[string]string 39 | // Maps the other way around 40 | urlNameByAuthor map[string]string 41 | // Maps author name to author information. 42 | infoByAuthor map[string]*AuthorInfo 43 | ) 44 | 45 | type page struct { 46 | Title string 47 | Description string 48 | Error string 49 | SitePrefix string 50 | } 51 | 52 | type indexPage struct { 53 | page 54 | Text string 55 | } 56 | 57 | type resultPage struct { 58 | page 59 | Author string 60 | Crc string 61 | AuthorURLSafe string 62 | Info *AuthorInfo 63 | IsShared bool 64 | } 65 | 66 | type writerPage struct { 67 | page 68 | Author string 69 | Info *AuthorInfo 70 | } 71 | 72 | type aboutPage struct { 73 | page 74 | Authors []string 75 | URLNameByAuthor map[string]string 76 | } 77 | 78 | type analyzingPage struct { 79 | page 80 | Delay int 81 | URL string 82 | } 83 | 84 | // cutText returns a string cut to approximately len bytes on 85 | // the nearest rune to len. The resulting text is never larger 86 | // than len bytes, but may be smaller, including an empty string. 87 | func cutText(s string, len int) string { 88 | for len > 0 { 89 | if utf8.RuneStart(s[len]) { 90 | return s[:len] 91 | } 92 | len-- 93 | } 94 | return "" 95 | } 96 | 97 | func analyze(text string) (author string, err error) { 98 | if len(text) > MaxTextLen { 99 | text = cutText(text, MaxTextLen) 100 | } 101 | if len(text) < MinTextLen { 102 | err = errors.New("Text is too short.") 103 | return 104 | } 105 | author, _ = classifier.Classify(tokenizer.WordsSpecials(text)) 106 | return 107 | } 108 | 109 | func indexHandler(w http.ResponseWriter, r *http.Request) { 110 | if r.URL.Path != "/" { 111 | http.NotFound(w, r) 112 | return 113 | } 114 | 115 | p := &indexPage{page: page{ 116 | Description: "Check which famous writer you write like with this statistical analysis tool.", 117 | SitePrefix: sitePrefix, 118 | }} 119 | 120 | if r.Method == "POST" { 121 | author, err := analyze(r.FormValue("text")) 122 | if err != nil { 123 | p.Error = err.Error() 124 | } else { 125 | // You may wonder what's going on here, why the 126 | // user has to be shown this "analyzing" page with 127 | // loading indicator and wait 2 seconds until redirected, 128 | // even though we already know the results. 129 | // The thing is... people just don't believe that 130 | // the server does any actual text analysis if we 131 | // returned answer instantly. Seriously! So, we 132 | // need this kind of placebo delay. 133 | 134 | // Successful analysis, redirect to author page. 135 | p := new(analyzingPage) 136 | p.SitePrefix = sitePrefix 137 | p.URL = path.Join(sitePrefix, "b", crcByAuthor[author]) 138 | p.Delay = rand.Intn(2) + 1 139 | 140 | if err := templates.Lookup("analyzing.html").Execute(w, p); err != nil { 141 | log.Printf("error: %s", err) 142 | } 143 | return 144 | } 145 | } 146 | 147 | if err := templates.Lookup("index.html").Execute(w, p); err != nil { 148 | log.Printf("error: %s", err) 149 | } 150 | } 151 | 152 | func makeResultHandler(isShared bool) http.HandlerFunc { 153 | return func(w http.ResponseWriter, r *http.Request) { 154 | crc := path.Base(r.URL.Path) 155 | author, ok := authorByCrc[crc] 156 | if !ok { 157 | // Author not found 158 | http.NotFound(w, r) 159 | return 160 | } 161 | 162 | p := new(resultPage) 163 | p.SitePrefix = sitePrefix 164 | p.Title = "You write like " + author 165 | p.Author = author 166 | p.Crc = crcByAuthor[author] 167 | p.Info = infoByAuthor[author] 168 | p.AuthorURLSafe = authorNameToURLSafeName(author) 169 | p.IsShared = isShared 170 | 171 | if err := templates.Lookup("result.html").Execute(w, p); err != nil { 172 | log.Printf("error: %s", err) 173 | } 174 | } 175 | } 176 | 177 | func writerRedirectHandler(w http.ResponseWriter, r *http.Request) { 178 | crc := path.Base(r.URL.Path) 179 | author, ok := authorByCrc[crc] 180 | if !ok { 181 | // Author not found 182 | http.NotFound(w, r) 183 | return 184 | } 185 | url := getAuthorURL(siteBaseURL, author) 186 | http.Redirect(w, r, url, http.StatusMovedPermanently) 187 | } 188 | 189 | func writerHandler(w http.ResponseWriter, r *http.Request) { 190 | urlName := path.Base(r.URL.Path) 191 | author, ok := authorByURLName[urlName] 192 | if !ok { 193 | // Author not found 194 | http.NotFound(w, r) 195 | return 196 | } 197 | 198 | p := new(writerPage) 199 | p.SitePrefix = sitePrefix 200 | p.Title = author 201 | p.Author = author 202 | p.Info = infoByAuthor[author] 203 | 204 | if err := templates.Lookup("writer.html").Execute(w, p); err != nil { 205 | log.Printf("error: %s", err) 206 | } 207 | } 208 | 209 | func aboutHandler(w http.ResponseWriter, r *http.Request) { 210 | p := new(aboutPage) 211 | p.SitePrefix = sitePrefix 212 | p.Title = "About" 213 | p.Authors = sortedAuthors 214 | p.URLNameByAuthor = urlNameByAuthor 215 | 216 | if err := templates.Lookup("about.html").Execute(w, p); err != nil { 217 | log.Printf("error: %s", err) 218 | } 219 | } 220 | 221 | func loadAuthors() { 222 | authorByCrc = make(map[string]string) 223 | crcByAuthor = make(map[string]string) 224 | authorByURLName = make(map[string]string) 225 | urlNameByAuthor = make(map[string]string) 226 | infoByAuthor = make(map[string]*AuthorInfo) 227 | sortedAuthors = make([]string, 0) 228 | for _, author := range classifier.Categories { 229 | sortedAuthors = append(sortedAuthors, author) 230 | crc := crc32.ChecksumIEEE([]byte(author)) 231 | hexCrc := strconv.FormatUint(uint64(crc), 16) 232 | authorByCrc[hexCrc] = author 233 | crcByAuthor[author] = hexCrc 234 | authorByURLName[authorNameToURLSafeName(author)] = author 235 | urlNameByAuthor[author] = authorNameToURLSafeName(author) 236 | for _, info := range authorInfos { 237 | if info.Name == author { 238 | infoByAuthor[author] = info 239 | } 240 | } 241 | } 242 | sort.Strings(sortedAuthors) 243 | } 244 | 245 | func serveStaticFile(filename string) http.HandlerFunc { 246 | data, err := embeddedFS.ReadFile(filename) 247 | if err != nil { 248 | log.Fatal(err) 249 | } 250 | return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 251 | w.Write(data) 252 | }) 253 | } 254 | 255 | func Serve(addr string) { 256 | // Parse templates. 257 | templates = template.Must(template.ParseFS(embeddedFS, "templates/*.html")) 258 | 259 | // Load authors. 260 | loadAuthors() 261 | 262 | // Add handlers. 263 | mux := http.NewServeMux() 264 | mux.HandleFunc("/", indexHandler) 265 | mux.HandleFunc("/b/", makeResultHandler(false)) 266 | mux.HandleFunc("/s/", makeResultHandler(true)) 267 | mux.HandleFunc("/w/", writerRedirectHandler) 268 | mux.HandleFunc("/writer/", writerHandler) 269 | mux.HandleFunc("/about/", aboutHandler) 270 | mux.HandleFunc("/api", apiHandler) 271 | mux.Handle("/static/", http.FileServer(http.FS(embeddedFS))) 272 | mux.HandleFunc("/favicon.ico", serveStaticFile("static/favicon.ico")) 273 | mux.HandleFunc("/robots.txt", serveStaticFile("static/robots.txt")) 274 | handler := http.StripPrefix(sitePrefix, mux) 275 | 276 | // Launch server. 277 | if addr == "" { 278 | if err := fcgi.Serve(nil, handler); err != nil { 279 | log.Fatal(err) 280 | } 281 | } else { 282 | log.Printf("Started HTTP server at %s", addr) 283 | if err := http.ListenAndServe(addr, handler); err != nil { 284 | log.Fatal(err) 285 | } 286 | } 287 | } 288 | -------------------------------------------------------------------------------- /iwlserve/static/c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/c.png -------------------------------------------------------------------------------- /iwlserve/static/css/picnic.min.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v3.0.1 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}*{box-sizing:inherit}html,body{font-family:Arial, Helvetica, sans-serif;box-sizing:border-box;height:100%}body{color:#111;font-size:1.1em;line-height:1.5;background:#fff}h1,h2,h3,h4,h5,h6{margin:0;padding:0.6em 0}li{margin:0 0 0.3em}a{color:#0074d9;text-decoration:none;box-shadow:none;transition:all 0.3s}code{padding:0.3em 0.6em;font-size:.8em;background:#f5f5f5}pre{text-align:left;padding:0.3em 0.6em;background:#f5f5f5;border-radius:0.2em}pre code{padding:0}blockquote{padding:0 0 0 1em;margin:0 0 0 .1em;box-shadow:inset 5px 0 rgba(17,17,17,0.3)}label{cursor:pointer}[class^="icon-"]:before,[class*=" icon-"]:before{margin:0 0.6em 0 0}i[class^="icon-"]:before,i[class*=" icon-"]:before{margin:0}.label,[data-tooltip]:after,button,.button,[type=submit],.dropimage{display:inline-block;text-align:center;margin:0;padding:0.3em 0.9em;vertical-align:middle;background:#0074d9;color:#fff;border:0;border-radius:0.2em;width:auto;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.success.label,.success[data-tooltip]:after,button.success,.success.button,.success[type=submit],.success.dropimage{background:#2ecc40}.warning.label,.warning[data-tooltip]:after,button.warning,.warning.button,.warning[type=submit],.warning.dropimage{background:#ff851b}.error.label,.error[data-tooltip]:after,button.error,.error.button,.error[type=submit],.error.dropimage{background:#ff4136}.pseudo.label,.pseudo[data-tooltip]:after,button.pseudo,.pseudo.button,.pseudo[type=submit],.pseudo.dropimage{background:transparent;color:#111}.label,[data-tooltip]:after{font-size:.6em;padding:.4em .6em;margin-left:1em;line-height:1}button,.button,[type=submit],.dropimage{margin:0.3em 0;cursor:pointer;transition:all 0.3s;height:auto;box-shadow:0 0 transparent inset}button:hover,.button:hover,[type=submit]:hover,.dropimage:hover,button:focus,.button:focus,[type=submit]:focus,.dropimage:focus{box-shadow:inset 0 0 0 99em rgba(255,255,255,0.2);border:0}button.pseudo:hover,.pseudo.button:hover,.pseudo[type=submit]:hover,.pseudo.dropimage:hover,button.pseudo:focus,.pseudo.button:focus,.pseudo[type=submit]:focus,.pseudo.dropimage:focus{box-shadow:inset 0 0 0 99em rgba(17,17,17,0.1)}button.active,.active.button,.active[type=submit],.active.dropimage,button:active,.button:active,[type=submit]:active,.dropimage:active,button.pseudo:active,.pseudo.button:active,.pseudo[type=submit]:active,.pseudo.dropimage:active{box-shadow:inset 0 0 0 99em rgba(17,17,17,0.2)}button[disabled],[disabled].button,[disabled][type=submit],[disabled].dropimage{cursor:default;box-shadow:none;background:#bbb}:checked+.toggle,:checked+.toggle:hover{box-shadow:inset 0 0 0 99em rgba(17,17,17,0.2)}[type]+.toggle{padding:0.3em 0.9em;margin-right:0}[type]+.toggle:after,[type]+.toggle:before{display:none}input,textarea,.select select{line-height:1.5;margin:0;height:2.1em;padding:0.3em 0.6em;border:1px solid #ccc;background:#fff;border-radius:0.2em;transition:all 0.3s;width:100%}input:focus,textarea:focus,.select select:focus{border:1px solid #0074d9;outline:0}textarea{height:auto}[type=file],[type=color]{cursor:pointer}[type=file]{height:auto}select{background:#fff url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyIiBoZWlnaHQ9IjMiPjxwYXRoIGQ9Im0gMCwxIDEsMiAxLC0yIHoiLz48L3N2Zz4=) no-repeat scroll 95% center/10px 15px;background-position:calc(100% - 15px) center;border:1px solid #ccc;border-radius:0.2em;cursor:pointer;width:100%;height:2.1em;box-sizing:border-box;padding:0.3em 0.45em;transition:all .3s;-moz-appearance:none;-webkit-appearance:none;appearance:none}select::-ms-expand{display:none}select:focus,select:active{border:1px solid #0074d9;transition:outline 0s}select:-moz-focusring{color:transparent;text-shadow:0 0 0 #111}select option{font-size:inherit;padding:0.3em 0.45em}[type=radio],[type=checkbox]{opacity:0;width:0;position:absolute;display:inline-block}[type=radio]+.checkable:hover:before,[type=checkbox]+.checkable:hover:before,[type=radio]:focus+.checkable:before,[type=checkbox]:focus+.checkable:before{border:1px solid #0074d9}[type=radio]+.checkable,[type=checkbox]+.checkable{position:relative;cursor:pointer;padding-left:1.5em;margin-right:.6em}[type=radio]+.checkable:before,[type=checkbox]+.checkable:before,[type=radio]+.checkable:after,[type=checkbox]+.checkable:after{content:'';position:absolute;display:inline-block;left:0;top:50%;transform:translateY(-50%);font-size:1em;line-height:1em;color:transparent;font-family:sans;text-align:center;box-sizing:border-box;width:1em;height:1em;border-radius:50%;transition:all 0.3s}[type=radio]+.checkable:before,[type=checkbox]+.checkable:before{border:1px solid #aaa}[type=radio]:checked+.checkable:after,[type=checkbox]:checked+.checkable:after{background:#555;transform:scale(0.5) translateY(-100%)}[type=checkbox]+.checkable:before{border-radius:0.2em}[type=checkbox]+.checkable:after{content:"✔";background:none;transform:scale(2) translateY(-25%);visibility:hidden;opacity:0}[type=checkbox]:checked+.checkable:after{color:#111;background:none;transform:translateY(-50%);transition:all 0.3s;visibility:visible;opacity:1}table{text-align:left}td,th{padding:0.3em 2.4em 0.3em 0.6em}th{text-align:left;font-weight:900;color:#fff;background-color:#0074d9}.success th{background-color:#2ecc40}.warning th{background-color:#ff851b}.error th{background-color:#ff4136}.dull th{background-color:#aaa}tr:nth-child(even){background:rgba(0,0,0,0.05)}.grid{display:block;width:calc(100% + 0.6em);margin:0 0 0 -0.6em}.grid:after{content:'';display:block;clear:both}.grid>*{float:left;width:calc(100% - 0.6em);margin:0 0 0.6em 0.6em}@media (min-width: 60em){.grid.two>*{width:calc(50% - 0.6em)}.grid.three>*{width:calc(33.33333% - 0.6em)}.grid.four>*{width:calc(25% - 0.6em)}.grid.five>*{width:calc(20% - 0.6em)}.grid.six>*{width:calc(16.66667% - 0.6em)}.grid.equal{width:calc(100% + 1.8em);display:table;table-layout:fixed;border-spacing:0.6em 0;margin:0 0 0.6em -0.6em}.grid.equal>*{display:table-cell;vertical-align:top;margin:0;float:none;width:100%}}.row>*{margin:0.6em 0}@media (min-width: 60em){.row{width:calc(100% + 2 * 0.6em);display:table;table-layout:fixed;border-spacing:0.6em 0;margin:0 0 0.6em -0.6em}.row>*{display:table-cell;vertical-align:top;margin:0;float:none}.none{display:none}.half{width:50%}.third{width:33.3333%}.two-third{width:66.6666%}.fourth{width:25%}.three-fourth{width:75%}.fifth{width:20%}.two-fifth{width:40%}.three-fifth{width:60%}.four-fifth{width:80%}}nav{position:fixed;top:0;left:0;right:0;height:3em;padding:0;background:#fff;box-shadow:0 0 0.2em rgba(17,17,17,0.2);z-index:10;transition:all .3s;transform-style:preserve-3d}nav .brand,nav .menu,nav .burger{float:right;position:relative;top:50%;transform:translateY(-50%)}nav .brand{font-weight:700;float:left;padding:0 0.6em;max-width:50%;white-space:nowrap;color:#111}nav .brand *{vertical-align:middle}nav .logo{height:2em;margin-right:.3em}nav .select::after{height:calc(100% - 1px);padding:0;line-height:2.4em}nav .menu>*{margin-right:0.6em}.burger{display:none}@media all and (max-width: 60em){nav .burger{display:inline-block;cursor:pointer;bottom:-1000em;margin:0}nav .menu,nav .show:checked ~ .burger{position:fixed;min-height:100%;width:0;overflow:hidden;top:0;right:0;bottom:-1000em;margin:0;background:#fff;transition:all .3s ease;transform:none}nav .show:checked ~ .burger{color:transparent;width:100%;border-radius:0;background:rgba(0,0,0,0.2);transition:all .3s ease}nav .show:checked ~ .menu{width:70%;overflow:auto;transition:all .3s ease}nav .menu>*{display:block;margin:0.3em;text-align:left}nav .menu>a{padding:0.3em 0.9em}}.stack,.stack .toggle{margin-top:0;margin-bottom:0;display:block;width:100%;text-align:left;border-radius:0}.stack:first-child,.stack:first-child .toggle{border-top-left-radius:0.2em;border-top-right-radius:0.2em}.stack:last-child,.stack:last-child .toggle{border-bottom-left-radius:0.2em;border-bottom-right-radius:0.2em}input.stack,textarea.stack,select.stack{transition:border-bottom 0 ease 0;border-bottom-width:0}input.stack:last-child,textarea.stack:last-child,select.stack:last-child{border-bottom-width:1px}input.stack:focus+input,input.stack:focus+textarea,input.stack:focus+select,textarea.stack:focus+input,textarea.stack:focus+textarea,textarea.stack:focus+select,select.stack:focus+input,select.stack:focus+textarea,select.stack:focus+select{border-top-color:#0074d9}.card,.modal .overlay ~ *{position:relative;box-shadow:0;border-radius:0.2em;border:1px solid #ccc;overflow:hidden;text-align:left;background:#fff;margin-bottom:0.6em;padding:0;transition:all .3s ease}.hidden.card,.modal .overlay ~ .hidden,:checked+.card,.modal .overlay ~ :checked+*,.modal .overlay:checked+*{font-size:0;padding:0;margin:0;border:0}.card>*,.modal .overlay ~ *>*{max-width:100%;display:block}.card>*:last-child,.modal .overlay ~ *>*:last-child{margin-bottom:0}.card header,.modal .overlay ~ * header,.card section,.modal .overlay ~ * section,.card>p,.modal .overlay ~ *>p{padding:.6em .8em}.card section,.modal .overlay ~ * section{padding:.6em .8em 0}.card hr,.modal .overlay ~ * hr{border:none;height:1px;background-color:#eee}.card header,.modal .overlay ~ * header{font-weight:bold;position:relative;border-bottom:1px solid #eee}.card header h1,.modal .overlay ~ * header h1,.card header h2,.modal .overlay ~ * header h2,.card header h3,.modal .overlay ~ * header h3,.card header h4,.modal .overlay ~ * header h4,.card header h5,.modal .overlay ~ * header h5,.card header h6,.modal .overlay ~ * header h6{padding:0;margin:0 2em 0 0;line-height:1;display:inline-block;vertical-align:text-bottom}.card header:last-child,.modal .overlay ~ * header:last-child{border-bottom:0}.card footer,.modal .overlay ~ * footer{padding:.8em}.card p,.modal .overlay ~ * p{margin:0.3em 0}.card p:first-child,.modal .overlay ~ * p:first-child{margin-top:0}.card p:last-child,.modal .overlay ~ * p:last-child{margin-bottom:0}.card>p,.modal .overlay ~ *>p{margin:0;padding-right:2.5em}.card .close,.modal .overlay ~ * .close{position:absolute;top:.4em;right:.3em;font-size:1.2em;padding:0 .5em;cursor:pointer;width:auto}.card .close:hover,.modal .overlay ~ * .close:hover{color:#ff4136}.card h1+.close,.modal .overlay ~ * h1+.close{margin:.2em}.card h2+.close,.modal .overlay ~ * h2+.close{margin:.1em}.card .dangerous,.modal .overlay ~ * .dangerous{background:#ff4136;float:right}.modal{text-align:center}.modal>input{display:none}.modal>input ~ *{opacity:0;max-height:0;overflow:hidden}.modal .overlay{top:0;left:0;bottom:0;right:0;position:fixed;margin:0;border-radius:0;background:rgba(17,17,17,0.6);transition:all 0.3s;z-index:99}.modal .overlay:before,.modal .overlay:after{display:none}.modal .overlay ~ *{border:0;position:fixed;top:50%;left:50%;transform:translateX(-50%) translateY(-50%) scale(0.2, 0.2);z-index:100;transition:all 0.3s}.modal>input:checked ~ *{display:block;opacity:1;max-height:10000px;transition:all 0.3s}.modal>input:checked ~ .overlay ~ *{max-height:90%;overflow:auto;-webkit-transform:translateX(-50%) translateY(-50%) scale(1, 1);transform:translateX(-50%) translateY(-50%) scale(1, 1)}@media (max-width: 60em){.modal .overlay ~ *{min-width:90%}}.dropimage{position:relative;display:block;padding:0;padding-bottom:56.25%;overflow:hidden;cursor:pointer;border:0;background-color:#ddd;background-size:cover;background-position:center center;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2NDAiIGhlaWdodD0iNjQwIiB2ZXJzaW9uPSIxLjEiPjxnIHN0eWxlPSJmaWxsOiMzMzMiPjxwYXRoIGQ9Ik0gMTg3IDIzMCBDIDE3NSAyMzAgMTY1IDI0MCAxNjUgMjUyIEwgMTY1IDMwMCBMIDE2NSA0MDggQyAxNjUgNDIwIDE3NSA0MzAgMTg3IDQzMCBMIDQ2MyA0MzAgQyA0NzUgNDMwIDQ4NSA0MjAgNDg1IDQwOCBMIDQ4NSAzMDAgTCA0ODUgMjUyIEMgNDg1IDI0MCA0NzUgMjMwIDQ2MyAyMzAgTCAxODcgMjMwIHogTSAzNjAgMjU2IEEgNzAgNzIgMCAwIDEgNDMwIDMyOCBBIDcwIDcyIDAgMCAxIDM2MCA0MDAgQSA3MCA3MiAwIDAgMSAyOTAgMzI4IEEgNzAgNzIgMCAwIDEgMzYwIDI1NiB6Ii8+PGNpcmNsZSBjeD0iMzYwIiBjeT0iMzMwIiByPSI0MSIvPjxwYXRoIGQ9Im0yMDUgMjI1IDUtMTAgMjAgMCA1IDEwLTMwIDAiLz48cGF0aCBkPSJNMjg1IDIwMEwyNzAgMjI1IDM3NiAyMjUgMzYxIDIwMCAyODUgMjAwek0zMTAgMjA1TDMzNyAyMDUgMzM3IDIxOCAzMTAgMjE4IDMxMCAyMDV6Ii8+PHBhdGggZD0ibTQwNSAyMjUgNS0xMCAyMCAwIDUgMTAtMzAgMCIvPjwvZz48L3N2Zz4=)}.dropimage input{left:0;width:100%;height:100%;border:0;margin:0;padding:0;opacity:0;position:absolute}.tabs{position:relative;overflow:hidden}.tabs>label img{float:left;margin-left:0.6em}.tabs>.row{width:calc(100% + 2 * .6em);display:table;table-layout:fixed;position:relative;padding-left:0;transition:all .3s;border-spacing:0;margin:0}.tabs>.row:before,.tabs>.row:after{display:none}.tabs>.row>*,.tabs>.row img{display:table-cell;vertical-align:top;margin:0;width:100%}.tabs>input{display:none}.tabs>input+*{width:100%}.tabs>input+label{width:auto}.two.tabs>.row{width:200%;left:-100%}.two.tabs>input:nth-of-type(1):checked ~ .row{margin-left:100%}.two.tabs>label img{width:48%;margin:4% 0 4% 4%}.three.tabs>.row{width:300%;left:-200%}.three.tabs>input:nth-of-type(1):checked ~ .row{margin-left:200%}.three.tabs>input:nth-of-type(2):checked ~ .row{margin-left:100%}.three.tabs>label img{width:30%;margin:5% 0 5% 5%}.four.tabs>.row{width:400%;left:-300%}.four.tabs>input:nth-of-type(1):checked ~ .row{margin-left:300%}.four.tabs>input:nth-of-type(2):checked ~ .row{margin-left:200%}.four.tabs>input:nth-of-type(3):checked ~ .row{margin-left:100%}.four.tabs>label img{width:22%;margin:4% 0 4% 4%}.tabs>label:first-of-type img{margin-left:0}[data-tooltip]{position:relative}[data-tooltip]:after,[data-tooltip]:before{position:absolute;z-index:10;opacity:0;border-width:0;height:0;padding:0;overflow:hidden;transition:opacity .6s ease, height 0s ease .6s;top:calc(100% - 6px);left:0;margin-top:12px}[data-tooltip]:after{margin-left:0;font-size:0.8em;background:#111;content:attr(data-tooltip);white-space:nowrap}[data-tooltip]:before{content:'';width:0;height:0;border-width:0;border-style:solid;border-color:transparent transparent #111;margin-top:0;left:10px}[data-tooltip]:hover:after,[data-tooltip]:focus:after,[data-tooltip]:hover:before,[data-tooltip]:focus:before{opacity:1;border-width:6px;height:auto}[data-tooltip]:hover:after,[data-tooltip]:focus:after{padding:0.45em 0.9em}.tooltip-top:after,.tooltip-top:before{top:auto;bottom:calc(100% - 6px);left:0;margin-bottom:12px}.tooltip-top:before{border-color:#111 transparent transparent;margin-bottom:0;left:10px}.tooltip-right:after,.tooltip-right:before{left:100%;margin-left:6px;margin-top:0;top:0}.tooltip-right:before{border-color:transparent #111 transparent transparent;margin-left:-6px;left:100%;top:7px}.tooltip-left:after,.tooltip-left:before{right:100%;margin-right:6px;left:auto;margin-top:0;top:0}.tooltip-left:before{border-color:transparent transparent transparent #111;margin-right:-6px;right:100%;top:7px} -------------------------------------------------------------------------------- /iwlserve/static/css/site.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"; 3 | font-size: 16px; 4 | line-height: 1.6; 5 | } 6 | 7 | body { 8 | padding: 3em 0; 9 | } 10 | 11 | .container, #footer { 12 | max-width: 1024px; 13 | width: 90%; 14 | margin: auto; 15 | padding: 0.6em; 16 | } 17 | 18 | nav .brand { 19 | font-size: 20px; 20 | margin-left: auto; 21 | } 22 | 23 | .button { 24 | line-height: auto; 25 | } 26 | 27 | .alert.error { 28 | background: #ff4136; 29 | color: #fff; 30 | padding: 5px 10px; 31 | border-radius: 4px; 32 | margin: 5px 0; 33 | } 34 | 35 | .text-muted, 36 | #footer { 37 | color: #555; 38 | } 39 | 40 | .right-or-centered { 41 | text-align: center; 42 | } 43 | 44 | @media (min-width: 60em) { 45 | .right-or-centered { 46 | text-align: right; 47 | } 48 | } 49 | 50 | .button-large { 51 | font-size: 20px; 52 | } 53 | 54 | .button-share, 55 | .button-share:focus { 56 | border: 1px solid #ccc; 57 | background: #fefefe; 58 | border-bottom-width: 2px; 59 | } 60 | 61 | .button-share:hover { 62 | border: 1px solid #aaa; 63 | background: #eee; 64 | border-bottom-width: 2px; 65 | } 66 | 67 | .button-share:active { 68 | border: 1px solid #444; 69 | background: #fff; 70 | } 71 | 72 | 73 | .result { 74 | background: #f4f4f4 url(/static/c.png); 75 | border-bottom: 1px solid #ddd; 76 | padding: 20px 0; 77 | } 78 | 79 | .about { 80 | background: #D9F1FD; 81 | border-bottom: 1px solid #CBE3EF; 82 | padding: 20px 0; 83 | } 84 | 85 | .footnote { 86 | line-height: 1.2; 87 | font-size: 13px; 88 | color: #777; 89 | } 90 | 91 | .amazon-mobile-ad { 92 | display: none; 93 | } 94 | 95 | @media (max-width: 60em) { 96 | .amazon-cpm-ad { 97 | display: none; 98 | } 99 | 100 | .amazon-mobile-ad { 101 | display: block; 102 | } 103 | } 104 | 105 | .author-pic { 106 | float: right; 107 | margin-left: 20px; 108 | margin-bottom: 20px; 109 | } 110 | 111 | .analyzing { 112 | position: fixed; 113 | top: 50%; 114 | left: 50%; 115 | -webkit-transform: translate(-50%, -50%); 116 | transform: translate(-50%, -50%); 117 | 118 | text-align: center; 119 | color: #555; 120 | } 121 | 122 | .memoires { 123 | border-top: 1px solid #eee; 124 | border-bottom: 1px solid #eee; 125 | margin: 20px 0; 126 | } 127 | -------------------------------------------------------------------------------- /iwlserve/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/favicon.ico -------------------------------------------------------------------------------- /iwlserve/static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/favicon.png -------------------------------------------------------------------------------- /iwlserve/static/iwl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/iwl.png -------------------------------------------------------------------------------- /iwlserve/static/memoires.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/memoires.jpg -------------------------------------------------------------------------------- /iwlserve/static/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /iwlserve/static/w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/w.png -------------------------------------------------------------------------------- /iwlserve/static/writers/agatha_christie.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/agatha_christie.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/anne_rice.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/anne_rice.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/arthur_clarke.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/arthur_clarke.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/arthur_conan_doyle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/arthur_conan_doyle.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/bram_stoker.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/bram_stoker.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/charles_dickens.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/charles_dickens.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/chuck_palahniuk.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/chuck_palahniuk.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/cory_doctorow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/cory_doctorow.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/dan_brown.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/dan_brown.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/daniel_defoe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/daniel_defoe.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/david_foster_wallace.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/david_foster_wallace.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/douglas_adams.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/douglas_adams.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/edgar_allan_poe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/edgar_allan_poe.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/ernest_hemingway.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/ernest_hemingway.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/george_orwell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/george_orwell.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/gertrude_stein.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/gertrude_stein.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/h_g_wells.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/h_g_wells.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/h_p_lovecraft.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/h_p_lovecraft.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/harry_harrison.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/harry_harrison.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/isaac_asimov.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/isaac_asimov.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/j_k_rowling.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/j_k_rowling.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/j_r_r_tolkien.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/j_r_r_tolkien.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/jack_london.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/jack_london.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/james_fenimore_cooper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/james_fenimore_cooper.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/james_joyce.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/james_joyce.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/jane_austen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/jane_austen.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/jonathan_swift.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/jonathan_swift.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/l_frank_baum.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/l_frank_baum.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/leo_tolstoy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/leo_tolstoy.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/lewis_carroll.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/lewis_carroll.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/margaret_atwood.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/margaret_atwood.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/margaret_mitchell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/margaret_mitchell.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/mark_twain.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/mark_twain.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/mary_shelley.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/mary_shelley.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/neil_gaiman.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/neil_gaiman.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/oscar_wilde.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/oscar_wilde.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/p_g_wodehouse.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/p_g_wodehouse.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/ray_bradbury.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/ray_bradbury.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/robert_louis_stevenson.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/robert_louis_stevenson.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/rudyard_kipling.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/rudyard_kipling.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/stephen_king.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/stephen_king.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/stephenie_meyer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/stephenie_meyer.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/ursula_k_le_guin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/ursula_k_le_guin.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/william_gibson.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/william_gibson.jpg -------------------------------------------------------------------------------- /iwlserve/static/writers/william_shakespeare.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding-robots/goiwl/d0badd0b4415bcc00eb03f59a4522753be5b546b/iwlserve/static/writers/william_shakespeare.jpg -------------------------------------------------------------------------------- /iwlserve/templates/about-author.html: -------------------------------------------------------------------------------- 1 | {{if .Info}} 2 | {{if .Info.PictureFile}} 3 |
10 | {{end}} 11 |12 | {{.Info.Desc}} 13 |
14 | 15 | {{end}} 16 | -------------------------------------------------------------------------------- /iwlserve/templates/about.html: -------------------------------------------------------------------------------- 1 | {{template "header.html" .}} 2 | 3 |The algorithm pretty simple, and you can find it on every computer today. It’s a Bayesian classifier, which is widely used to fight spam on the Internet. Take for example the “Mark as spam” button in Gmail or Outlook. When you receive a message that you think is spam, you click this button, and the internal database gets trained to recognize future messages similar to this one as spam. This is basically how “I Write Like” works on my side: I feed it with “Frankenstein” and tell it, “This is Mary Shelley. Recognize works similar to this as Mary Shelley.” Of course, the algorithm is slightly different from the one used to detect spam, because it takes into account more stylistic features of the text, such as the number of words in sentences, the number of commas, semicolons, and whether the sentence is a direct speech or a quotation.
14 | 15 |Do you want to learn more?
16 |We published our source code for everyone to review or reuse.
24 | 25 |It depends on your views on writing style. Certainly, you can't rely on our analysis 100%. Try it and decide for yourself.
27 | 28 | 29 |To contact us, please email to iwl@codingrobots.com 32 | 33 | 34 |
Great! Here are some books about writing:
36 | 37 | 51 | 52 | 53 |Analyzing your text
27 | If nothing happens, please click here.
28 |