优化脚本以便为更长的文本随机格式化

时间:2017-08-11 06:35:18

标签: javascript jquery html performance

这是我的问题:

我创建了一个工具,可以自动格式化一些粗体文本段落。它的工作方式如下:我将文本放在.txt文件中,从第一个脚本将其加载到页面上。第二个脚本从文本中选择一些随机短语并将它们格式化为粗体。如果我使用小文本(<500字),它可以正常工作,但如果我尝试使用更长的文本(方式超过1000w),我会让#34;脚本不能正常工作&#34;弹出我的浏览器,我可以停止它或调试它。我现在正在寻找能够处理更长文本的解决方案。

以下是我目前使用的两个脚本:

$(document).ready(function() {
$(function() {
    function bold() {
        var target = document.getElementById("randomText");
        var oldHTML = target.innerHTML;
        for (j = 0; j < 25; j++) {
            target = document.getElementById("randomText");
            oldHTML = target.innerHTML;
            for (j = 0; j < 25; j++) {
                words = oldHTML.split(" ");
                wordCount = words.length;
                var newHTML = "";
                var highlightStart = Math.floor(Math.random() * wordCount) + 1;
                var highlightLength = Math.floor(Math.random() * 5) + 1;
                for (i = 0; i < wordCount; i++) {
                    if (i == highlightStart) newHTML = newHTML + "<b>";
                    newHTML = newHTML + words[i] + " ";
                    if (i == highlightStart + highlightLength) newHTML = newHTML + "</b>";
                    target.innerHTML = newHTML;
                }
                oldHTML = newHTML;
            }
        };
    };
    $('#randomText').load("hier.txt", bold)
})
});

我将两个原始剧本合二为一。 如果有人能告诉我性能方面的问题源于何处以及如何改进它,那就太好了。

1 个答案:

答案 0 :(得分:0)

这里的想法不是多个嵌套循环,而是最初从给定文本中捕获随机选择的单词 - 这是通过将字符串随机化为数组然后使用一点点随机选择的随机数字来完成的效用函数getrnd

通过随机选择单词,您可以通过迭代所选单词并使用正则表达式进行单词匹配,在原始文本中进行实际替换(以粗体等方式)。

<!doctype html>
<html>
    <head>
        <title>freakin regex</title>
    </head>
    <body>
        <!-- approx 8000 words in given text -->
        <div id='randomText'>
             sagittis turpis, non sagittis libero consectetur sed. Aliquam erat volutpat. Aliquam lacinia purus sit amet dignissim convallis. Fusce augue eros, ornare dictum elementum vel, blandit sit amet nisi.  dolor laoreet et. Praesent interdum imperdiet eros, et posuere dui facilisis elementum. Suspendisse aliquet vulputate consequat. Vestibulum ultrices purus neque. Quisque ligula tortor, placerat vel ultrices sed, pulvinar eget eros. Duis quis massa arcu. Morbi dolor purus, tempor et ex eu, eleifend tincidunt lorem. Curabitur ut elementum elit, nec faucibus turpis. Sed sit amet arcu sodales, fermentum odio in, aliquam lectus. Donec pretium lectus malesuada, bibendum turpis id, sollicitudin ipsum. Cras imperdiet ligula vitae arcu dictum pulvinar. Morbi massa felis, convallis vitae porta ut, efficitur quis sapien. Etiam laoreet tempus sem ut aliquam. Ut nec vestibulum purus, eget venenatis ligula. Aenean porta leo vel leo condimentum, ut egestas orci mattis. Nulla eu dapibus lacus. Pellentesque viverra tortor at purus feugiat, ac feugiat risus egestas. Nulla nec tincidunt massa, eget consectetur tortor. Integer ultrices, eros eu vehicula auctor, eros eros placerat ipsum, vel ornare massa nunc molestie sem. Curabitur aliquam vitae purus in dapibus. Duis fringilla dapibus velit, vel condimentum augue lobortis ut. Donec sit amet diam ac turpis lobortis sagittis. In hac habitasse platea dictumst. Sed vehicula volutpat ipsum hendrerit vestibulum. In iaculis sodales neque nec cursus. Nulla rutrum, leo id interdum ullamcorper, erat odio suscipit magna, vitae consequat libero odio non velit. Morbi mattis scelerisque nunc. Etiam ac porta tellus. Phasellus iaculis molestie dui, ut accumsan dui dapibus ac. Donec aliquam faucibus scelerisque. Aliquam eget orci ut dui tincidunt porttitor. Proin a consectetur nunc. Curabitur convallis ex ut sapien consequat consectetur. Aliquam imperdiet placerat odio id fermentum. Mauris fringilla consectetur libero, sit amet dapibus velit ornare non. Nullam placerat fringilla massa, vel suscipit mauris feugiat in. Morbi placerat lacinia nunc nec hendrerit. Nam consectetur tristique quam, sit amet scelerisque nunc ullamcorper at. Quisque mattis rutrum elit. Mauris malesuada nec lacus sit amet rutrum. Suspendisse eleifend eros id libero vehicula, vitae luctus odio tempus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ac vehicula ante. Ut euismod eros justo, quis hendrerit quam congue efficitur. Pellentesque dui metus, dapibus ac bibendum non, consectetur sed neque. Nunc ut sem lorem. Curabitur sed turpis tincidunt, aliquet nisi eu, consequat leo. Sed ante orci, venenatis vel libero sed, vulputate scelerisque diam. Pellentesque et massa ut mauris maximus imperdiet tincidunt non augue. Morbi bibendum, risus in laoreet dignissim, elit risus interdum dolor, a dignissim nunc nibh non odio. Sed sit amet quam sit amet ante laoreet sagittis. Phasellus ligula justo, accumsan quis magna non, sollicitudin mollis nisi. Praesent in est nec leo dictum viverra. Pellentesque nisl est, pellentesque nec orci vulputate, commodo faucibus tortor. Suspendisse vitae dolor lobortis, efficitur tortor id, cursus ligula. Donec at mi euismod, porttitor ligula sit amet, laoreet tellus. Nullam facilisis dui purus, id laoreet mauris egestas a. Ut mauris leo, pretium condimentum dignissim eu, convallis in ipsum. Duis rhoncus gravida dignissim. Nunc et tincidunt ipsum, nec vulputate libero. Vivamus sodales lorem lacus, sit amet pulvinar nunc ultrices id. Pellentesque nisi metus, egestas at erat a, semper commodo quam. Sed tellus quam, imperdiet eget urna a, molestie aliquet diam. Morbi tincidunt ornare auctor. Praesent porttitor, dui et auctor mattis, enim nunc pellentesque metus, mollis mollis leo dolor at sapien. Integer a congue purus, non malesuada quam. Quisque leo sapien, rutrum ac luctus ac, dictum ac lectus. Donec quis dolor in arcu faucibus tincidunt vel vitae neque. Aenean porttitor tempus orci. Nunc placerat lorem ac laoreet venenatis. Quisque rhoncus maximus feugiat. Morbi venenatis ultricies ipsum, quis laoreet lorem malesuada et. Maecenas sed sapien laoreet, ultrices risus sed, facilisis risus. Integer quis orci neque. Nullam ut ultricies ligula. Nullam a dictum lectus. Fusce fringilla vel arcu vitae eleifend. Mauris vehicula lacinia venenatis. Quisque bibendum sem sed aliquet commodo. Aliquam laoreet nisi vel risus pulvinar, ac sollicitudin lacus pharetra. Donec finibus convallis porttitor. In fermentum nibh dolor, at luctus turpis facilisis sit amet. Mauris faucibus interdum velit non scelerisque. Sed maximus tortor elit, eu dictum nisi vulputate facilisis. Vestibulum fringilla, sem consectetur rhoncus tempor, nibh est finibus lacus, non maximus velit velit nec ex. Suspendisse ultrices lorem non commodo euismod. Morbi aliquam maximus ex at ultricies. Duis vitae leo eget velit molestie luctus ac vitae velit. Sed vel tempor felis. Mauris maximus lectus enim, nec ullamcorper nibh fringilla finibus. Sed interdum est lobortis, scelerisque dui id, bibendum nulla. Suspendisse blandit ullamcorper finibus. Duis nunc felis, commodo eu dictum eget, lacinia eget metus. Maecenas magna arcu, elementum facilisis turpis nec, commodo tincidunt libero. Pellentesque tempor vel lectus at semper. Nullam rhoncus fermentum convallis. Quisque tempor sollicitudin nibh eleifend molestie. Morbi semper nunc a sapien consequat facilisis. In at molestie nunc. Integer tempor ipsum et sem dapibus convallis. Donec ante sem, suscipit a commodo nec, pulvinar a elit. Maecenas vitae rutrum est, vel rutrum turpis. Cras purus magna, bibendum id auctor sit amet, placerat sit amet metus. Fusce ac bibendum sem. Nullam vitae risus dapibus, imperdiet urna eget, convallis magna. Mauris sodales ligula sed diam porttitor porta. Praesent convallis ex sed lorem accumsan consectetur. Nam dapibus scelerisque sem, bibendum sagittis nulla faucibus eu. Nullam rutrum sapien et mattis porta. Etiam non felis eget tortor blandit pulvinar sed eu ante. Fusce porttitor purus sed tellus viverra, ut commodo nulla aliquet. Donec a elementum tellus. Ut dui velit, egestas eu semper vel, cursus nec diam. Integer in lectus ut felis gravida imperdiet. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris sapien lectus, mollis sed dolor vestibulum, porta sagittis nunc. Maecenas vel gravida ligula. Nam venenatis eget nisi eget hendrerit. Aliquam rhoncus, mauris nec rhoncus rutrum, ipsum magna bibendum mauris, sed vulputate massa orci ultrices risus. Quisque commodo faucibus accumsan. Phasellus fringilla lectus pellentesque laoreet molestie. In hac habitasse platea dictumst. Integer pulvinar massa quis ligula consequat, eu tempor eros pellentesque. Donec sit amet lacinia sapien. Fusce sollicitudin velit sed pellentesque rhoncus. Morbi condimentum ante sit amet rhoncus congue. Donec dapibus placerat libero, eget scelerisque ante malesuada ut. Fusce pulvinar sit amet mi vestibulum auctor. Phasellus feugiat diam dignissim dui rhoncus, in egestas augue ullamcorper. Mauris a auctor leo, a mattis quam. Fusce tempus tortor eros, sed consequat ante auctor et. Nullam dui augue, dignissim varius urna eu, maximus volutpat erat. Ut lorem lacus, porta vel sapien eget, sollicitudin convallis neque. Aliquam dapibus diam et sem venenatis, eget interdum enim imperdiet. Vivamus sollicitudin vitae mi id fermentum. Nullam at blandit odio. Nunc iaculis sed risus sit amet ullamcorper. Morbi malesuada tellus vitae vehicula placerat. Ut condimentum mollis pellentesque. Aliquam lacinia, urna non condimentum semper, ex lectus mattis purus, ac mollis justo tellus commodo arcu. Integer dapibus sem magna, eu facilisis elit pharetra ut. Etiam tortor diam, tempus sit amet accumsan eu, faucibus nec ante. Integer finibus odio nunc, a suscipit neque feugiat sit amet. Nam varius sagittis turpis, non sagittis libero consectetur sed. Aliquam erat volutpat. Morbi nibh sapien, tempor vel tristique at, pellentesque nec turpis. Quisque ligula arcu, fermentum id lacus vitae, vestibulum maximus massa. Pellentesque sit amet mollis nisi. Suspendisse potenti. Aliquam rhoncus lobortis lacus, sed pellentesque ligula accumsan sit amet. Sed commodo nulla laoreet hendrerit dignissim. In hac habitasse platea dictumst. Nullam varius sagittis velit, ut bibendum orci luctus vitae. Aenean et commodo turpis. Nullam non aliquet orci. Vivamus laoreet semper nisi eu bibendum. Morbi nunc ipsum, viverra in dictum eu, malesuada et ligula. Maecenas eu ante et lectus ultricies placerat. Phasellus auctor tempor ex, sit amet lacinia est. Vestibulum gravida libero at nulla imperdiet aliquet. In sagittis porttitor felis, et tincidunt magna congue commodo. Aliquam lacinia purus sit amet dignissim convallis. Fusce augue eros, ornare dictum elementum vel, blandit sit amet nisi. Sed faucibus augue non lobortis varius. Morbi vehicula nunc ac metus aliquet scelerisque. Phasellus lacinia lacinia lectus nec molestie. Pellentesque cursus mauris purus, ut eleifend sapien porta facilisis. Maecenas id nisi mollis, finibus justo non, sollicitudin nulla. Donec in enim massa. Proin blandit, erat non feugiat euismod, nisi orci rhoncus erat, vitae auctor justo neque suscipit lorem. Cras eleifend quis nibh a sagittis.      Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis auctor ultricies mi, a tincidunt lorem venenatis ac. Nunc at mauris et sapien aliquam posuere. Maecenas eget lacus diam. Vivamus sit amet dui consectetur, viverra ex sit amet, aliquam mi. Phasellus aliquam vehicula nunc eu suscipit. Nam et nisi rhoncus, pellentesque nibh ultricies, blandit nunc. Duis tincidunt blandit est et fringilla. Proin sollicitudin urna nulla, vel egestas libero euismod pulvinar. Mauris dui justo, semper eget neque ac, cursus rhoncus nibh. Proin sem justo, euismod vel mollis quis, consequat eu elit. Aenean nec arcu luctus, cursus nulla nec, vehicula massa. Donec sollicitudin est sed arcu posuere aliquet. Phasellus viverra, urna ac cursus luctus, neque tellus pellentesque ante, nec ultricies tellus dolor sed justo. Ut varius massa eget pretium ullamcorper. Curabitur in blandit risus. Fusce imperdiet consectetur urna at efficitur. Fusce lorem mauris, gravida vitae quam quis, cursus blandit massa. Suspendisse faucibus malesuada quam, et varius lectus tincidunt vitae. Suspendisse nec cursus erat, et commodo lectus. Mauris volutpat neque non tortor gravida, quis vulputate libero volutpat. Ut bibendum et sapien id fermentum. Donec vulputate malesuada odio, at viverra dolor laoreet et. Praesent interdum imperdiet eros, et posuere dui facilisis elementum. Suspendisse aliquet vulputate consequat. Vestibulum ultrices purus neque. Quisque ligula tortor, placerat vel ultrices sed, pulvinar eget eros. Duis quis massa arcu. Morbi dolor purus, tempor et ex eu, eleifend tincidunt lorem. Curabitur ut elementum elit, nec faucibus turpis. Sed sit amet arcu sodales, fermentum odio in, aliquam lectus. Donec pretium lectus malesuada, bibendum turpis id, sollicitudin ipsum. Cras imperdiet ligula vitae arcu dictum pulvinar. Morbi massa felis, convallis vitae porta ut, efficitur quis sapien. Etiam laoreet tempus sem ut aliquam. Ut nec vestibulum purus, eget venenatis ligula. Aenean porta leo vel leo condimentum, ut egestas orci mattis. Nulla eu dapibus lacus. Pellentesque viverra tortor at purus feugiat, ac feugiat risus egestas. Nulla nec tincidunt massa, eget consectetur tortor. Integer ultrices, eros eu vehicula auctor, eros eros placerat ipsum, vel ornare massa nunc molestie sem. Curabitur aliquam vitae purus in dapibus. Duis fringilla dapibus velit, vel condimentum augue lobortis ut. Donec sit amet diam ac turpis lobortis sagittis. In hac habitasse platea dictumst. Sed vehicula volutpat ipsum hendrerit vestibulum. In iaculis sodales neque nec cursus. Nulla rutrum, leo id interdum ullamcorper, erat odio suscipit magna, vitae consequat libero odio non velit. Morbi mattis scelerisque nunc. Etiam ac porta tellus. Phasellus iaculis molestie dui, ut accumsan dui dapibus ac. Donec aliquam faucibus scelerisque. Aliquam eget orci ut dui tincidunt porttitor. Proin a consectetur nunc. Curabitur convallis ex ut sapien consequat consectetur. Aliquam imperdiet placerat odio id fermentum. Mauris fringilla consectetur libero, sit amet dapibus velit ornare non. Nullam placerat fringilla massa, vel suscipit mauris feugiat in. Morbi placerat lacinia nunc nec hendrerit. Nam consectetur tristique quam, sit amet scelerisque nunc ullamcorper at. Quisque mattis rutrum elit. Mauris malesuada nec lacus sit amet rutrum. Suspendisse eleifend eros id libero vehicula, vitae luctus odio tempus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ac vehicula ante. Ut euismod eros justo, quis hendrerit quam congue efficitur. Pellentesque dui metus, dapibus ac bibendum non, consectetur sed neque. Nunc ut sem lorem. Curabitur sed turpis tincidunt, aliquet nisi eu, consequat leo. Sed ante orci, venenatis vel libero sed, vulputate scelerisque diam. Pellentesque et massa ut mauris maximus imperdiet tincidunt non augue. Morbi bibendum, risus in laoreet dignissim, elit risus interdum dolor, a dignissim nunc nibh non odio. Sed sit amet quam sit amet ante laoreet sagittis. Phasellus ligula justo, accumsan quis magna non, sollicitudin mollis nisi. Praesent in est nec leo dictum viverra. Pellentesque nisl est, pellentesque nec orci vulputate, commodo faucibus tortor. Suspendisse vitae dolor lobortis, efficitur tortor id, cursus ligula. Donec at mi euismod, porttitor ligula sit amet, laoreet tellus. Nullam facilisis dui purus, id laoreet mauris egestas a. Ut mauris leo, pretium condimentum dignissim eu, convallis in ipsum. Duis rhoncus gravida dignissim. Nunc et tincidunt ipsum, nec vulputate libero. Vivamus sodales lorem lacus, sit amet pulvinar nunc ultrices id. Pellentesque nisi metus, egestas at erat a, semper commodo quam. Sed tellus quam, imperdiet eget urna a, molestie aliquet diam. Morbi tincidunt ornare auctor. Praesent porttitor, dui et auctor mattis, enim nunc pellentesque metus, mollis mollis leo dolor at sapien. Integer a congue purus, non malesuada quam. Quisque leo sapien, rutrum ac luctus ac, dictum ac lectus. Donec quis dolor in arcu faucibus tincidunt vel vitae neque. Aenean porttitor tempus orci. Nunc placerat lorem ac laoreet venenatis. Quisque rhoncus maximus feugiat. Morbi venenatis ultricies ipsum, quis laoreet lorem malesuada et. Maecenas sed sapien laoreet, ultrices risus sed, facilisis risus. Integer quis orci neque. Nullam ut ultricies ligula. Nullam a dictum lectus. Fusce fringilla vel arcu vitae eleifend. Mauris vehicula lacinia venenatis. Quisque bibendum sem sed aliquet commodo. Aliquam laoreet nisi vel risus pulvinar, ac sollicitudin lacus pharetra. Donec finibus convallis porttitor. In fermentum nibh dolor, at luctus turpis facilisis sit amet. Mauris faucibus interdum velit non scelerisque. Sed maximus tortor elit, eu dictum nisi vulputate facilisis. Vestibulum fringilla, sem consectetur rhoncus tempor, nibh est finibus lacus, non maximus velit velit nec ex. Suspendisse ultrices lorem non commodo euismod. Morbi aliquam maximus ex at ultricies. Duis vitae leo eget velit molestie luctus ac vitae velit. Sed vel tempor felis. Mauris maximus lectus enim, nec ullamcorper nibh fringilla finibus. Sed interdum est lobortis, scelerisque dui id, bibendum nulla. Suspendisse blandit ullamcorper finibus. Duis nunc felis, commodo eu dictum eget, lacinia eget metus. Maecenas magna arcu, elementum facilisis turpis nec, commodo tincidunt libero. Pellentesque tempor vel lectus at semper. Nullam rhoncus fermentum convallis. Quisque tempor sollicitudin nibh eleifend molestie. Morbi semper nunc a sapien consequat facilisis. In at molestie nunc. Integer tempor ipsum et sem dapibus convallis. Donec ante sem, suscipit a commodo nec, pulvinar a elit. Maecenas vitae rutrum est, vel rutrum turpis. Cras purus magna, bibendum id auctor sit amet, placerat sit amet metus. Fusce ac bibendum sem. Nullam vitae risus dapibus, imperdiet urna eget, convallis magna. Mauris sodales ligula sed diam porttitor porta. Praesent convallis ex sed lorem accumsan consectetur. Nam dapibus scelerisque sem, bibendum sagittis nulla faucibus eu. Nullam rutrum sapien et mattis porta. Etiam non felis eget tortor blandit pulvinar sed eu ante. Fusce porttitor purus sed tellus viverra, ut commodo nulla aliquet. Donec a elementum tellus. Ut dui velit, egestas eu semper vel, cursus nec diam. Integer in lectus ut felis gravida imperdiet. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris sapien lectus, mollis sed dolor vestibulum, porta sagittis nunc. Maecenas vel gravida ligula. Nam venenatis eget nisi eget hendrerit. Aliquam rhoncus, mauris nec rhoncus rutrum, ipsum magna bibendum mauris, sed vulputate massa orci ultrices risus. Quisque commodo faucibus accumsan. Phasellus fringilla lectus pellentesque laoreet molestie. In hac habitasse platea dictumst. Integer pulvinar massa quis ligula consequat, eu tempor eros pellentesque. Donec sit amet lacinia sapien. Fusce sollicitudin velit sed pellentesque rhoncus. Morbi condimentum ante sit amet rhoncus congue. Donec dapibus placerat libero, eget scelerisque ante malesuada ut. Fusce pulvinar sit amet mi vestibulum auctor. Phasellus feugiat diam dignissim dui rhoncus, in egestas augue ullamcorper. Mauris a auctor leo, a mattis quam. Fusce tempus tortor eros, sed consequat ante auctor et. Nullam dui augue, dignissim varius urna eu, maximus volutpat erat. Ut lorem lacus, porta vel sapien eget, sollicitudin convallis neque. Aliquam dapibus diam et sem venenatis, eget interdum enim imperdiet. Vivamus sollicitudin vitae mi id fermentum. Nullam at blandit odio. Nunc iaculis sed risus sit amet ullamcorper. Morbi malesuada tellus vitae vehicula placerat. Ut condimentum mollis pellentesque. Aliquam lacinia, urna non condimentum semper, ex lectus mattis purus, ac mollis justo tellus commodo arcu. Integer dapibus sem magna, eu facilisis elit pharetra ut. Etiam tortor diam, tempus sit amet accumsan eu, faucibus nec ante. Integer finibus odio nunc, a suscipit neque feugiat sit amet. Nam varius sagittis turpis, non sagittis libero consectetur sed. Aliquam erat volutpat. Morbi nibh sapien, tempor vel tristique at, pellentesque nec turpis. Quisque ligula arcu, fermentum id lacus vitae, vestibulum maximus massa. Pellentesque sit amet mollis nisi. Suspendisse potenti. Aliquam rhoncus lobortis lacus, sed pellentesque ligula accumsan sit amet. Sed commodo nulla laoreet hendrerit dignissim. In hac habitasse platea dictumst. Nullam varius sagittis velit, ut bibendum orci luctus vitae. Aenean et commodo turpis. Nullam non aliquet orci. Vivamus laoreet semper nisi eu bibendum. Morbi nunc ipsum, viverra in dictum eu, malesuada et ligula. Maecenas eu ante et lectus ultricies placerat. Phasellus auctor tempor ex, sit amet lacinia est. Vestibulum gravida libero at nulla imperdiet aliquet. In sagittis porttitor felis, et tincidunt magna congue commodo. Aliquam lacinia purus sit amet dignissim convallis. Fusce augue eros, ornare dictum elementum vel, blandit sit amet nisi. Sed faucibus augue non lobortis varius. Morbi vehicula nunc ac metus aliquet scelerisque. Phasellus lacinia lacinia lectus nec molestie. Pellentesque cursus mauris purus, ut eleifend sapien porta facilisis. Maecenas id nisi mollis, finibus justo non, sollicitudin nulla. Donec in enim massa. Proin blandit, erat non feugiat euismod, nisi orci rhoncus erat, vitae auctor justo neque suscipit lorem. Cras eleifend quis nibh a sagittis. He as compliment unreserved projecting. Between had observe pretend delight for believe. Do newspaper questions consulted sweetness do. Our sportsman his unwilling fulfilled departure law. Now world own total saved above her cause table. Wicket myself her square remark the should far secure sex. Smiling cousins warrant law explain for whether.  Too cultivated use solicitude frequently. Dashwood likewise up consider continue entrance ladyship oh. Wrong guest given purse power is no. Friendship to connection an am considered difficulty. Country met pursuit lasting moments why calling certain the. Middletons boisterous our way understood law. Among state cease how and sight since shall. Material did pleasure breeding our humanity she contempt had. So ye really mutual no cousin piqued summer result.  It allowance prevailed enjoyment in it. Calling observe for who pressed raising his. Can connection instrument astonished unaffected his motionless preference. Announcing say boy precaution unaffected difficulty alteration him. Above be would at so going heard. Engaged at village at am equally proceed. Settle nay length almost ham direct extent. Agreement for listening remainder get attention law acuteness day. Now whatever surprise resolved elegance indulged own way outlived.  Article nor prepare chicken you him now. Shy merits say advice ten before lovers innate add. She cordially behaviour can attempted estimable. Trees delay fancy noise manor do as an small. Felicity now law securing breeding likewise extended and. Roused either who favour why ham.  Shot what able cold new the see hold. Friendly as an betrayed formerly he. Morning because as to society behaved moments. Put ladies design mrs sister was. Play on hill felt john no gate. Am passed figure to marked in. Prosperous middletons is ye inhabiting as assistance me especially. For looking two cousins regular amongst.  Silent sir say desire fat him letter. Whatever settling goodness too and honoured she building answered her. Strongly thoughts remember mr to do consider debating. Spirits musical behaved on we he farther letters. Repulsive he he as deficient newspaper dashwoods we. Discovered her his pianoforte insipidity entreaties. Began he at terms meant as fancy. Breakfast arranging he if furniture we described on. Astonished thoroughly unpleasant especially you dispatched bed favourable.  Dwelling and speedily ignorant any steepest. Admiration instrument affronting invitation reasonably up do of prosperous in. Shy saw declared age debating ecstatic man. Call in so want pure rank am dear were. Remarkably to continuing in surrounded diminution on. In unfeeling existence objection immediate repulsive on he in. Imprudence comparison uncommonly me he difficulty diminution resolution. Likewise proposal differed scarcely dwelling as on raillery. September few dependent extremity own continued and ten prevailed attending. Early to weeks we could.  Material confined likewise it humanity raillery an unpacked as he. Three chief merit no if. Now how her edward engage not horses. Oh resolution he dissimilar precaution to comparison an. Matters engaged between he of pursuit manners we moments. Merit gay end sight front. Manor equal it on again ye folly by match. In so melancholy as an sentiments simplicity connection. Far supply depart branch agreed old get our.  Mr oh winding it enjoyed by between. The servants securing material goodness her. Saw principles themselves ten are possession. So endeavor to continue cheerful doubtful we to. Turned advice the set vanity why mutual. Reasonably if conviction on be unsatiable discretion apartments delightful. Are melancholy appearance stimulated occasional entreaties end. Shy ham had esteem happen active county. Winding morning am shyness evident to. Garrets because elderly new manners however one village she.  It real sent your at. Amounted all shy set why followed declared. Repeated of endeavor mr position kindness offering ignorant so up. Simplicity are melancholy preference considered saw companions. Disposal on outweigh do speedily in on. Him ham although thoughts entirely drawings. Acceptance unreserved old admiration projection nay yet him. Lasted am so before on esteem vanity oh.  Affronting imprudence do he he everything. Sex lasted dinner wanted indeed wished out law. Far advanced settling say finished raillery. Offered chiefly farther of my no colonel shyness. Such on help ye some door if in. Laughter proposal laughing any son law consider. Needed except up piqued an.  He unaffected sympathize discovered at no am conviction principles. Girl ham very how yet hill four show. Meet lain on he only size. Branched learning so subjects mistress do appetite jennings be in. Esteems up lasting no village morning do offices. Settled wishing ability musical may another set age. Diminution my apartments he attachment is entreaties announcing estimating. And total least her two whose great has which. Neat pain form eat sent sex good week. Led instrument sentiments she simplicity.  Kindness to he horrible reserved ye. Effect twenty indeed beyond for not had county. The use him without greatly can private. Increasing it unpleasant no of contrasted no continuing. Nothing colonel my no removed in weather. It dissimilar in up devonshire inhabiting.  Smallest directly families surprise honoured am an. Speaking replying mistress him numerous she returned feelings may day. Evening way luckily son exposed get general greatly. Zealously prevailed be arranging do. Set arranging too dejection september happiness. Understood instrument or do connection no appearance do invitation. Dried quick round it or order. Add past see west felt did any. Say out noise you taste merry plate you share. My resolve arrived is we chamber be removal.  Excited him now natural saw passage offices you minuter. At by asked being court hopes. Farther so friends am to detract. Forbade concern do private be. Offending residence but men engrossed shy. Pretend am earnest offered arrived company so on. Felicity informed yet had admitted strictly how you.  Can curiosity may end shameless explained. True high on said mr on come. An do mr design at little myself wholly entire though. Attended of on stronger or mr pleasure. Rich four like real yet west get. Felicity in dwelling to drawings. His pleasure new steepest for reserved formerly disposed jennings.  For who thoroughly her boy estimating conviction. Removed demands expense account in outward tedious do. Particular way thoroughly unaffected projection favourable mrs can projecting own. Thirty it matter enable become admire in giving. See resolved goodness felicity shy civility domestic had but. Drawings offended yet answered jennings perceive laughing six did far.  Difficulty on insensible reasonable in. From as went he they. Preference themselves me as thoroughly partiality considered on in estimating. Middletons acceptance discovered projecting so is so or. In or attachment inquietude remarkably comparison at an. Is surrounded prosperous stimulated am me discretion expression. But truth being state can she china widow. Occasional preference fat remarkably now projecting uncommonly dissimilar. Sentiments projection particular companions interested do at my delightful. Listening newspaper in advantage frankness to concluded unwilling.  In to am attended desirous raptures declared diverted confined at. Collected instantly remaining up certainly to necessary as. Over walk dull into son boy door went new. At or happiness commanded daughters as. Is handsome an declared at received in extended vicinity subjects. Into miss on he over been late pain an. Only week bore boy what fat case left use. Match round scale now sex style far times. Your me past an much.  Why end might ask civil again spoil. She dinner she our horses depend. Remember at children by reserved to vicinity. In affronting unreserved delightful simplicity ye. Law own advantage furniture continual sweetness bed agreeable perpetual. Oh song well four only head busy it. Afford son she had lively living. Tastes lovers myself too formal season our valley boy. Lived it their their walls might to by young. 
        </div>
        <script>

            /* Shuffle an array randomly */
            Array.prototype.shuffle = function() {
              var i=this.length,j,t;
              if(i==0)return this;
              while(i--) {
                 j=Math.floor(Math.random()*(i+1));
                 t=this[i];
                 this[i]=this[j];
                 this[j]=t;
              }
              return this;
            };

            /* generate pseudo random number - used to select random words */
            function getrnd(a,b){
                return Math.round(a+(Math.random()*(b-a)));
            }
            function replacer(match){
                return '<span style="color:red;font-weight:bold;text-decoration:underline;background-color:yellow">'+match+'</span>'
            }

            var upper=100;/* select this many potential words randomly */
            var target=document.getElementById('randomText');
            var text=target.innerHTML;
            var wordcount=text.match(/\b/gi).length;
            console.info( 'String length is %d characters with approx %d words',text.length,wordcount );
            var shuffled=text.split(' ').shuffle();
            var count=getrnd(0,upper);

            if( count > 0 ){
                var selection=shuffled.slice(0,count);
                for( i=0; i < selection.length; i++ ) {
                    var regex=new RegExp( '\\b'+selection[i].trim()+'\\b', 'i')
                    text = text.replace(regex,replacer);
                }
                target.innerHTML=text;
            }
        </script>
    </body>
</html>