(()=>{"use strict";const e=window.yoast.analysis,{getSentences:r,getWords:n}=e.languageProcessing,o=["I","you","me","my","mine","your","yours","myself","yourself","yourselves"],t=["we","they","their","theirs","themselves","us","our","ours","ourselves","it","its","itself"];function s(e,r){return e.filter((e=>r.includes(e)))}analysisWorker.registerResearch("textFormality",(function(e,l){const{charsPerSentence:a,wordsPerSentence:i,averageFormalPronouns:m,averageInformalPronouns:u}=function(e,l){const a=e.getText(),i=l.getHelper("memoizedTokenizer"),m=r(a,i),u=n(a);var g;return{charsPerSentence:(0===(g=m).length?0:g.map((e=>e.length)).reduce(((e,r)=>e+r)))/m.length,wordsPerSentence:u.length/m.length,averageFormalPronouns:s(u,t).length/u.length,averageInformalPronouns:s(u,o).length/u.length}}(e,l);return u<=.01805790513753891?a<=90.87325286865234?a<=73.79549026489258?"informal":a<=86.5999984741211?"formal":"informal":a<=172.26373291015625&&m<=.05696944147348404?"formal":"informal":u<=.04157066158950329?i<=24.832167625427246?"informal":m<=.0007042253273539245?"formal":"informal":u<=.06274875998497009?u<=.06258514896035194?"informal":"formal":"informal"}))})();