CamelCasoid: Difference between revisions

From fridemar.ai
Jump to navigation Jump to search
m (f: CamelCasoid is a generalization of CamelCase. q: What other patterns than CamelCase words, aka WikiWords can TinyAi handle? Beyond WikiWords it encompasses lowerCamelCase and combinations like WikiWord+WikiWord2+WikiWord3 ai: Please click me below)
m (triple ai)
 
(4 intermediate revisions by the same user not shown)
Line 3: Line 3:
q: What other patterns than CamelCase words, aka WikiWords can TinyAi handle?
q: What other patterns than CamelCase words, aka WikiWords can TinyAi handle?


Beyond WikiWords it encompasses lowerCamelCase and combinations like WikiWord+WikiWord2+WikiWord3
f: Beyond WikiWords it encompasses lowerCamelCase and combinations like WikiWord+WikiWord2+WikiWord3 and WikiWord1_WikiWord2, and more.


ai: Please click me below to see, how I can help you.
ai: Please click me below to see, how I can help you.


<html>javascript:function%20ai()%7Bvar%20WikiMap%3D%5B%27http://google.com/search%3Fq%3D%27,%27https://aipedia.eu/index.php%3Ftitle%3D%27,%27https://etherpad.wikimedia.org/p/%27%5D,i,j,k,len,llen,link,linkpatt,linkText,linkTextArray%3D%5B%5D,msg,myArray,node,txt,href,a,reg,span,lastLastIndex,textNodeXpath,textNodes%3BtextNodeXpath%3D%27.//text()%5Bnot(ancestor::a)%20and%20not(ancestor::head)and%20not(ancestor::option)%20and%20not(ancestor::textarea)%5D%27%3BtextNodes%3Ddocument.evaluate(textNodeXpath,document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null)%3Blen%3DtextNodes.snapshotLength%3Breg%3D/%5E%5Cs%2B%24/g%3Blinkpatt%3D/%5Cb(%3F:(%5Ba-z0-9%C3%A4%C3%B6%C3%BC%5D*(%3F:%5BA-Z%C3%84%C3%96%C3%9C_%5D%7C_)%5Ba-z0-9%C3%A4%C3%B6%C3%BC_%5D*)%7B2,%7D)%5Cb/g%3Bfor(i%3D0%3Bi%3Clen%3Bi%2B%2B)%7Bnode%3DtextNodes.snapshotItem(i)%3Btxt%3Dnode.nodeValue%3Btxt%3Dtxt.replace(reg,%27%27)%3Bif(linkpatt.test(txt))%7Bspan%3Ddocument.createElement(%27span%27)%3BlastLastIndex%3D0%3Blinkpatt.lastIndex%3D0%3Btry%7Bwhile(true)%7BmyArray%3Dlinkpatt.exec(txt)%3Bif(!myArray)break%3Blink%3DmyArray%5B0%5D%3BlinkTextArray%3D%5Blink,%27%20%C2%B0%27,%27%20%C2%B9%27,%27%20%C2%B2%27,%27%20%C2%B3%27%5D%3Bspan.appendChild(document.createTextNode(txt.substring(lastLastIndex,myArray.index)))%3BlastLastIndex%3Dlinkpatt.lastIndex%3BlinkText%3DmyArray%5B1%5D%3Blink%3DmyArray%5B0%5D%3Bllen%3Dlink.length%3Bif(link.substring(0,2)%3D%3D%27%27%26%26link.substring(llen-2,llen)%3D%3D%27%27)%7Blink%3Dlink.substring(2,llen-2)%3B%7Dfor(j%3D0%3Bj%3CMath.min(WikiMap.length,linkTextArray.length)%3Bj%2B%2B)%7Bhref%3DWikiMap%5Bj%5D%2Blink%3Ba%3Ddocument.createElement(%27a%27)%3Ba.setAttribute(%27href%27,href)%3Ba.appendChild(document.createTextNode(linkTextArray%5Bj%5D))%3Bspan.appendChild(a)%3B%7D%7Dspan.appendChild(document.createTextNode(txt.substring(lastLastIndex)))%3Bnode.parentNode.replaceChild(span,node)%3B%7Dcatch(e)%7Balert(e)%3B%7D%7D%7Dmsg%3D%27alca%20enabled%20with:%5Cn%27%2B%27%5CnMainLink:%27%2BWikiMap%5B0%5D%2B%27%5Cn0:%27%2BWikiMap%5B1%5D%2B%27%5Cn1:%27%2BWikiMap%5B2%5D%2B%27%5Cn2:%27%2BWikiMap%5B3%5D%2B%27%5Cn3:%27%2BWikiMap%5B4%5D%2B%27%5Cn:%27%2B%27%5Cn:%27%2B%27Intermediate%20Webpages:%27%2B%27%5Cn:%27%2Bdocument.location%3B%7Dai()%3B
<html><a href="javascript:function ai(){var WikiMap=['http://google.com/search?q=','https://aipedia.eu/index.php?title=','https://etherpad.wikimedia.org/p/'],i,j,k,len,llen,link,linkpatt,linkText,linkTextArray=[],msg,myArray,node,txt,href,a,reg,span,lastLastIndex,textNodeXpath,textNodes;textNodeXpath='.//text()[not(ancestor::a) and not(ancestor::head)and not(ancestor::option) and not(ancestor::textarea)]';textNodes=document.evaluate(textNodeXpath,document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);len=textNodes.snapshotLength;reg=/^\s+$/g;linkpatt=/\b(?:([a-z0-9äöü]*(?:[A-ZÄÖÜ_]|_)[a-z0-9äöü_]*){2,})\b/g;for(i=0;i<len;i++){node=textNodes.snapshotItem(i);txt=node.nodeValue;txt=txt.replace(reg,'');if(linkpatt.test(txt)){span=document.createElement('span');lastLastIndex=0;linkpatt.lastIndex=0;try{while(true){myArray=linkpatt.exec(txt);if(!myArray)break;link=myArray[0];linkTextArray=[link,' °',' ¹',' ²',' ³'];span.appendChild(document.createTextNode(txt.substring(lastLastIndex,myArray.index)));lastLastIndex=linkpatt.lastIndex;linkText=myArray[1];link=myArray[0];llen=link.length;if(link.substring(0,2)==''&&link.substring(llen-2,llen)==''){link=link.substring(2,llen-2);}for(j=0;j<Math.min(WikiMap.length,linkTextArray.length);j++){href=WikiMap[j]+link;a=document.createElement('a');a.setAttribute('href',href);a.appendChild(document.createTextNode(linkTextArray[j]));span.appendChild(a);}}span.appendChild(document.createTextNode(txt.substring(lastLastIndex)));node.parentNode.replaceChild(span,node);}catch(e){alert(e);}}}msg='alca enabled with:\n'+'\nMainLink:'+WikiMap[0]+'\n0:'+WikiMap[1]+'\n1:'+WikiMap[2]+'\n2:'+WikiMap[3]+'\n3:'+WikiMap[4]+'\n:'+'\n:'+'Intermediate Webpages:'+'\n:'+document.location;}ai();"><bold> => ai </bold></a>
<html>
</html>
 
( ai: I create MultiLinks for:  MainLink=GoogleSearch, 0=AiPedia, 1=MediaWikiEtherpad, in prealpha mostly empty, but helpful for bootstrapping. )

Latest revision as of 03:29, 14 November 2017

f: CamelCasoid is a generalization of CamelCase.

q: What other patterns than CamelCase words, aka WikiWords can TinyAi handle?

f: Beyond WikiWords it encompasses lowerCamelCase and combinations like WikiWord+WikiWord2+WikiWord3 and WikiWord1_WikiWord2, and more.

ai: Please click me below to see, how I can help you.

=> ai

( ai: I create MultiLinks for: MainLink=GoogleSearch, 0=AiPedia, 1=MediaWikiEtherpad, in prealpha mostly empty, but helpful for bootstrapping. )