Thesaurus.html 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!-- NewPage -->
  3. <html lang="en">
  4. <head>
  5. <!-- Generated by javadoc -->
  6. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7. <title>Thesaurus (squidlib-util 3.0.0-SNAPSHOT)</title>
  8. <link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
  9. <script type="text/javascript" src="../script.js"></script>
  10. </head>
  11. <body>
  12. <script type="text/javascript"><!--
  13. try {
  14. if (location.href.indexOf('is-external=true') == -1) {
  15. parent.document.title="Thesaurus (squidlib-util 3.0.0-SNAPSHOT)";
  16. }
  17. }
  18. catch(err) {
  19. }
  20. //-->
  21. var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10};
  22. var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
  23. var altColor = "altColor";
  24. var rowColor = "rowColor";
  25. var tableTab = "tableTab";
  26. var activeTableTab = "activeTableTab";
  27. </script>
  28. <noscript>
  29. <div>JavaScript is disabled on your browser.</div>
  30. </noscript>
  31. <!-- ========= START OF TOP NAVBAR ======= -->
  32. <div class="topNav"><a name="navbar.top">
  33. <!-- -->
  34. </a>
  35. <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
  36. <a name="navbar.top.firstrow">
  37. <!-- -->
  38. </a>
  39. <ul class="navList" title="Navigation">
  40. <li><a href="../overview-summary.html">Overview</a></li>
  41. <li><a href="package-summary.html">Package</a></li>
  42. <li class="navBarCell1Rev">Class</li>
  43. <li><a href="class-use/Thesaurus.html">Use</a></li>
  44. <li><a href="package-tree.html">Tree</a></li>
  45. <li><a href="../deprecated-list.html">Deprecated</a></li>
  46. <li><a href="../index-files/index-1.html">Index</a></li>
  47. <li><a href="../help-doc.html">Help</a></li>
  48. </ul>
  49. </div>
  50. <div class="subNav">
  51. <ul class="navList">
  52. <li><a href="../squidpony/StringKit.html" title="class in squidpony"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  53. <li><a href="../squidpony/WeightedLetterNamegen.html" title="class in squidpony"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  54. </ul>
  55. <ul class="navList">
  56. <li><a href="../index.html?squidpony/Thesaurus.html" target="_top">Frames</a></li>
  57. <li><a href="Thesaurus.html" target="_top">No&nbsp;Frames</a></li>
  58. </ul>
  59. <ul class="navList" id="allclasses_navbar_top">
  60. <li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li>
  61. </ul>
  62. <div>
  63. <script type="text/javascript"><!--
  64. allClassesLink = document.getElementById("allclasses_navbar_top");
  65. if(window==top) {
  66. allClassesLink.style.display = "block";
  67. }
  68. else {
  69. allClassesLink.style.display = "none";
  70. }
  71. //-->
  72. </script>
  73. </div>
  74. <div>
  75. <ul class="subNavList">
  76. <li>Summary:&nbsp;</li>
  77. <li>Nested&nbsp;|&nbsp;</li>
  78. <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
  79. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  80. <li><a href="#method.summary">Method</a></li>
  81. </ul>
  82. <ul class="subNavList">
  83. <li>Detail:&nbsp;</li>
  84. <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
  85. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  86. <li><a href="#method.detail">Method</a></li>
  87. </ul>
  88. </div>
  89. <a name="skip.navbar.top">
  90. <!-- -->
  91. </a></div>
  92. <!-- ========= END OF TOP NAVBAR ========= -->
  93. <!-- ======== START OF CLASS DATA ======== -->
  94. <div class="header">
  95. <div class="subTitle">squidpony</div>
  96. <h2 title="Class Thesaurus" class="title">Class Thesaurus</h2>
  97. </div>
  98. <div class="contentContainer">
  99. <ul class="inheritance">
  100. <li><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
  101. <li>
  102. <ul class="inheritance">
  103. <li>squidpony.Thesaurus</li>
  104. </ul>
  105. </li>
  106. </ul>
  107. <div class="description">
  108. <ul class="blockList">
  109. <li class="blockList">
  110. <dl>
  111. <dt>All Implemented Interfaces:</dt>
  112. <dd><a href="http://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></dd>
  113. </dl>
  114. <hr>
  115. <br>
  116. <pre>public class <a href="../src-html/squidpony/Thesaurus.html#line.18">Thesaurus</a>
  117. extends <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
  118. implements <a href="http://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></pre>
  119. <div class="block">A text processing class that can swap out occurrences of words and replace them with their synonyms.
  120. Created by Tommy Ettinger on 5/23/2016.</div>
  121. <dl>
  122. <dt><span class="seeLabel">See Also:</span></dt>
  123. <dd><a href="../serialized-form.html#squidpony.Thesaurus">Serialized Form</a></dd>
  124. </dl>
  125. </li>
  126. </ul>
  127. </div>
  128. <div class="summary">
  129. <ul class="blockList">
  130. <li class="blockList">
  131. <!-- =========== FIELD SUMMARY =========== -->
  132. <ul class="blockList">
  133. <li class="blockList"><a name="field.summary">
  134. <!-- -->
  135. </a>
  136. <h3>Field Summary</h3>
  137. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
  138. <caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
  139. <tr>
  140. <th class="colFirst" scope="col">Modifier and Type</th>
  141. <th class="colLast" scope="col">Field and Description</th>
  142. </tr>
  143. <tr class="altColor">
  144. <td class="colFirst"><code>static <a href="../squidpony/squidmath/OrderedMap.html" title="class in squidpony.squidmath">OrderedMap</a>&lt;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html?is-external=true" title="class or interface in java.util">ArrayList</a>&lt;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&gt;</code></td>
  145. <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/Thesaurus.html#categories">categories</a></span></code>&nbsp;</td>
  146. </tr>
  147. <tr class="rowColor">
  148. <td class="colFirst"><code>static <a href="../squidpony/squidmath/OrderedMap.html" title="class in squidpony.squidmath">OrderedMap</a>&lt;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html?is-external=true" title="class or interface in java.util">ArrayList</a>&lt;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&gt;</code></td>
  149. <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/Thesaurus.html#languages">languages</a></span></code>&nbsp;</td>
  150. </tr>
  151. <tr class="altColor">
  152. <td class="colFirst"><code><a href="../squidpony/squidmath/OrderedMap.html" title="class in squidpony.squidmath">OrderedMap</a>&lt;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="../squidpony/squidmath/GapShuffler.html" title="class in squidpony.squidmath">GapShuffler</a>&lt;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&gt;</code></td>
  153. <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/Thesaurus.html#mappings">mappings</a></span></code>&nbsp;</td>
  154. </tr>
  155. <tr class="rowColor">
  156. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html?is-external=true" title="class or interface in java.util">ArrayList</a>&lt;<a href="../squidpony/FakeLanguageGen.html" title="class in squidpony">FakeLanguageGen</a>&gt;</code></td>
  157. <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/Thesaurus.html#randomLanguages">randomLanguages</a></span></code>&nbsp;</td>
  158. </tr>
  159. <tr class="altColor">
  160. <td class="colFirst"><code>protected <a href="../squidpony/squidmath/StatefulRNG.html" title="class in squidpony.squidmath">StatefulRNG</a></code></td>
  161. <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/Thesaurus.html#rng">rng</a></span></code>&nbsp;</td>
  162. </tr>
  163. <tr class="rowColor">
  164. <td class="colFirst"><code>protected static regexodus.Pattern</code></td>
  165. <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/Thesaurus.html#similarFinder">similarFinder</a></span></code>&nbsp;</td>
  166. </tr>
  167. <tr class="altColor">
  168. <td class="colFirst"><code>protected static regexodus.Pattern</code></td>
  169. <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/Thesaurus.html#wordMatch">wordMatch</a></span></code>&nbsp;</td>
  170. </tr>
  171. </table>
  172. </li>
  173. </ul>
  174. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  175. <ul class="blockList">
  176. <li class="blockList"><a name="constructor.summary">
  177. <!-- -->
  178. </a>
  179. <h3>Constructor Summary</h3>
  180. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  181. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  182. <tr>
  183. <th class="colOne" scope="col">Constructor and Description</th>
  184. </tr>
  185. <tr class="altColor">
  186. <td class="colOne"><code><span class="memberNameLink"><a href="../squidpony/Thesaurus.html#Thesaurus--">Thesaurus</a></span>()</code>
  187. <div class="block">Constructs a new Thesaurus with an unseeded RNG used to shuffle word order.</div>
  188. </td>
  189. </tr>
  190. <tr class="rowColor">
  191. <td class="colOne"><code><span class="memberNameLink"><a href="../squidpony/Thesaurus.html#Thesaurus-long-">Thesaurus</a></span>(long&nbsp;shuffleSeed)</code>
  192. <div class="block">Constructs a new Thesaurus, seeding its RNG (used to shuffle word order) with shuffleSeed.</div>
  193. </td>
  194. </tr>
  195. <tr class="altColor">
  196. <td class="colOne"><code><span class="memberNameLink"><a href="../squidpony/Thesaurus.html#Thesaurus-squidpony.squidmath.RNG-">Thesaurus</a></span>(<a href="../squidpony/squidmath/RNG.html" title="class in squidpony.squidmath">RNG</a>&nbsp;rng)</code>
  197. <div class="block">Constructs a new Thesaurus, seeding its RNG (used to shuffle word order) with the next long from the given RNG.</div>
  198. </td>
  199. </tr>
  200. <tr class="rowColor">
  201. <td class="colOne"><code><span class="memberNameLink"><a href="../squidpony/Thesaurus.html#Thesaurus-java.lang.String-">Thesaurus</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;shuffleSeed)</code>
  202. <div class="block">Constructs a new Thesaurus, seeding its RNG (used to shuffle word order) with shuffleSeed.</div>
  203. </td>
  204. </tr>
  205. </table>
  206. </li>
  207. </ul>
  208. <!-- ========== METHOD SUMMARY =========== -->
  209. <ul class="blockList">
  210. <li class="blockList"><a name="method.summary">
  211. <!-- -->
  212. </a>
  213. <h3>Method Summary</h3>
  214. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  215. <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
  216. <tr>
  217. <th class="colFirst" scope="col">Modifier and Type</th>
  218. <th class="colLast" scope="col">Method and Description</th>
  219. </tr>
  220. <tr id="i0" class="altColor">
  221. <td class="colFirst"><code><a href="../squidpony/Thesaurus.html" title="class in squidpony">Thesaurus</a></code></td>
  222. <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/Thesaurus.html#addCategory-java.lang.String-java.util.Collection-">addCategory</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;keyword,
  223. <a href="http://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;synonyms)</code>
  224. <div class="block">Allows this Thesaurus to replace a specific keyword, typically containing multiple backtick characters ('`') so
  225. it can't be confused with a "real word," with one of the words in synonyms (chosen in shuffled order).</div>
  226. </td>
  227. </tr>
  228. <tr id="i1" class="rowColor">
  229. <td class="colFirst"><code><a href="../squidpony/Thesaurus.html" title="class in squidpony">Thesaurus</a></code></td>
  230. <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/Thesaurus.html#addFakeWords--">addFakeWords</a></span>()</code>
  231. <div class="block">Adds a large list of words pre-generated by FakeLanguageGen and hand-picked for fitness, and makes them
  232. accessible with a keyword based on the language and any tweaks made to it.</div>
  233. </td>
  234. </tr>
  235. <tr id="i2" class="altColor">
  236. <td class="colFirst"><code><a href="../squidpony/Thesaurus.html" title="class in squidpony">Thesaurus</a></code></td>
  237. <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/Thesaurus.html#addKnownCategories--">addKnownCategories</a></span>()</code>
  238. <div class="block">Adds several pre-made categories to this Thesaurus' known categories, but won't cause it to try to replace normal
  239. words with synonyms (only categories, which contain backticks in the name).</div>
  240. </td>
  241. </tr>
  242. <tr id="i3" class="rowColor">
  243. <td class="colFirst"><code><a href="../squidpony/Thesaurus.html" title="class in squidpony">Thesaurus</a></code></td>
  244. <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/Thesaurus.html#addSynonyms-java.util.Collection-">addSynonyms</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;synonyms)</code>
  245. <div class="block">Allows this Thesaurus to find the exact words in synonyms and, when requested, replace each occurrence with a
  246. different word from the same Collection.</div>
  247. </td>
  248. </tr>
  249. <tr id="i4" class="altColor">
  250. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  251. <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/Thesaurus.html#lookup-java.lang.String-">lookup</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;word)</code>&nbsp;</td>
  252. </tr>
  253. <tr id="i5" class="rowColor">
  254. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  255. <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/Thesaurus.html#makeNationName--">makeNationName</a></span>()</code>
  256. <div class="block">Generates a random possible name for a nation, such as "Iond-Gouccief Alliance" or "The Last Drayo Commonwealth".</div>
  257. </td>
  258. </tr>
  259. <tr id="i6" class="altColor">
  260. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  261. <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/Thesaurus.html#process-java.lang.CharSequence-">process</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;text)</code>
  262. <div class="block">Given a String, StringBuilder, or other CharSequence that should contain words this knows synonyms for, this
  263. replaces each occurrence of such a known word with one of its synonyms, leaving unknown words untouched.</div>
  264. </td>
  265. </tr>
  266. </table>
  267. <ul class="blockList">
  268. <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
  269. <!-- -->
  270. </a>
  271. <h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
  272. <code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
  273. </ul>
  274. </li>
  275. </ul>
  276. </li>
  277. </ul>
  278. </div>
  279. <div class="details">
  280. <ul class="blockList">
  281. <li class="blockList">
  282. <!-- ============ FIELD DETAIL =========== -->
  283. <ul class="blockList">
  284. <li class="blockList"><a name="field.detail">
  285. <!-- -->
  286. </a>
  287. <h3>Field Detail</h3>
  288. <a name="wordMatch">
  289. <!-- -->
  290. </a>
  291. <ul class="blockList">
  292. <li class="blockList">
  293. <h4>wordMatch</h4>
  294. <pre>protected static final&nbsp;regexodus.Pattern <a href="../src-html/squidpony/Thesaurus.html#line.20">wordMatch</a></pre>
  295. </li>
  296. </ul>
  297. <a name="similarFinder">
  298. <!-- -->
  299. </a>
  300. <ul class="blockList">
  301. <li class="blockList">
  302. <h4>similarFinder</h4>
  303. <pre>protected static final&nbsp;regexodus.Pattern <a href="../src-html/squidpony/Thesaurus.html#line.21">similarFinder</a></pre>
  304. </li>
  305. </ul>
  306. <a name="mappings">
  307. <!-- -->
  308. </a>
  309. <ul class="blockList">
  310. <li class="blockList">
  311. <h4>mappings</h4>
  312. <pre>public&nbsp;<a href="../squidpony/squidmath/OrderedMap.html" title="class in squidpony.squidmath">OrderedMap</a>&lt;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="../squidpony/squidmath/GapShuffler.html" title="class in squidpony.squidmath">GapShuffler</a>&lt;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&gt; <a href="../src-html/squidpony/Thesaurus.html#line.22">mappings</a></pre>
  313. </li>
  314. </ul>
  315. <a name="rng">
  316. <!-- -->
  317. </a>
  318. <ul class="blockList">
  319. <li class="blockList">
  320. <h4>rng</h4>
  321. <pre>protected&nbsp;<a href="../squidpony/squidmath/StatefulRNG.html" title="class in squidpony.squidmath">StatefulRNG</a> <a href="../src-html/squidpony/Thesaurus.html#line.23">rng</a></pre>
  322. </li>
  323. </ul>
  324. <a name="randomLanguages">
  325. <!-- -->
  326. </a>
  327. <ul class="blockList">
  328. <li class="blockList">
  329. <h4>randomLanguages</h4>
  330. <pre>public transient&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html?is-external=true" title="class or interface in java.util">ArrayList</a>&lt;<a href="../squidpony/FakeLanguageGen.html" title="class in squidpony">FakeLanguageGen</a>&gt; <a href="../src-html/squidpony/Thesaurus.html#line.24">randomLanguages</a></pre>
  331. </li>
  332. </ul>
  333. <a name="categories">
  334. <!-- -->
  335. </a>
  336. <ul class="blockList">
  337. <li class="blockList">
  338. <h4>categories</h4>
  339. <pre>public static final&nbsp;<a href="../squidpony/squidmath/OrderedMap.html" title="class in squidpony.squidmath">OrderedMap</a>&lt;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html?is-external=true" title="class or interface in java.util">ArrayList</a>&lt;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&gt; <a href="../src-html/squidpony/Thesaurus.html#line.330">categories</a></pre>
  340. </li>
  341. </ul>
  342. <a name="languages">
  343. <!-- -->
  344. </a>
  345. <ul class="blockListLast">
  346. <li class="blockList">
  347. <h4>languages</h4>
  348. <pre>public static final&nbsp;<a href="../squidpony/squidmath/OrderedMap.html" title="class in squidpony.squidmath">OrderedMap</a>&lt;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html?is-external=true" title="class or interface in java.util">ArrayList</a>&lt;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&gt; <a href="../src-html/squidpony/Thesaurus.html#line.442">languages</a></pre>
  349. </li>
  350. </ul>
  351. </li>
  352. </ul>
  353. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  354. <ul class="blockList">
  355. <li class="blockList"><a name="constructor.detail">
  356. <!-- -->
  357. </a>
  358. <h3>Constructor Detail</h3>
  359. <a name="Thesaurus--">
  360. <!-- -->
  361. </a>
  362. <ul class="blockList">
  363. <li class="blockList">
  364. <h4>Thesaurus</h4>
  365. <pre>public&nbsp;<a href="../src-html/squidpony/Thesaurus.html#line.29">Thesaurus</a>()</pre>
  366. <div class="block">Constructs a new Thesaurus with an unseeded RNG used to shuffle word order.</div>
  367. </li>
  368. </ul>
  369. <a name="Thesaurus-squidpony.squidmath.RNG-">
  370. <!-- -->
  371. </a>
  372. <ul class="blockList">
  373. <li class="blockList">
  374. <h4>Thesaurus</h4>
  375. <pre>public&nbsp;<a href="../src-html/squidpony/Thesaurus.html#line.39">Thesaurus</a>(<a href="../squidpony/squidmath/RNG.html" title="class in squidpony.squidmath">RNG</a>&nbsp;rng)</pre>
  376. <div class="block">Constructs a new Thesaurus, seeding its RNG (used to shuffle word order) with the next long from the given RNG.</div>
  377. <dl>
  378. <dt><span class="paramLabel">Parameters:</span></dt>
  379. <dd><code>rng</code> - an RNG that will only be used to get one long (for seeding this class' RNG)</dd>
  380. </dl>
  381. </li>
  382. </ul>
  383. <a name="Thesaurus-long-">
  384. <!-- -->
  385. </a>
  386. <ul class="blockList">
  387. <li class="blockList">
  388. <h4>Thesaurus</h4>
  389. <pre>public&nbsp;<a href="../src-html/squidpony/Thesaurus.html#line.49">Thesaurus</a>(long&nbsp;shuffleSeed)</pre>
  390. <div class="block">Constructs a new Thesaurus, seeding its RNG (used to shuffle word order) with shuffleSeed.</div>
  391. <dl>
  392. <dt><span class="paramLabel">Parameters:</span></dt>
  393. <dd><code>shuffleSeed</code> - a long for seeding this class' RNG</dd>
  394. </dl>
  395. </li>
  396. </ul>
  397. <a name="Thesaurus-java.lang.String-">
  398. <!-- -->
  399. </a>
  400. <ul class="blockListLast">
  401. <li class="blockList">
  402. <h4>Thesaurus</h4>
  403. <pre>public&nbsp;<a href="../src-html/squidpony/Thesaurus.html#line.60">Thesaurus</a>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;shuffleSeed)</pre>
  404. <div class="block">Constructs a new Thesaurus, seeding its RNG (used to shuffle word order) with shuffleSeed.</div>
  405. <dl>
  406. <dt><span class="paramLabel">Parameters:</span></dt>
  407. <dd><code>shuffleSeed</code> - a String for seeding this class' RNG</dd>
  408. </dl>
  409. </li>
  410. </ul>
  411. </li>
  412. </ul>
  413. <!-- ============ METHOD DETAIL ========== -->
  414. <ul class="blockList">
  415. <li class="blockList"><a name="method.detail">
  416. <!-- -->
  417. </a>
  418. <h3>Method Detail</h3>
  419. <a name="addSynonyms-java.util.Collection-">
  420. <!-- -->
  421. </a>
  422. <ul class="blockList">
  423. <li class="blockList">
  424. <h4>addSynonyms</h4>
  425. <pre>public&nbsp;<a href="../squidpony/Thesaurus.html" title="class in squidpony">Thesaurus</a>&nbsp;<a href="../src-html/squidpony/Thesaurus.html#line.79">addSynonyms</a>(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;synonyms)</pre>
  426. <div class="block">Allows this Thesaurus to find the exact words in synonyms and, when requested, replace each occurrence with a
  427. different word from the same Collection. Each word in synonyms should have the same part of speech, so "demon"
  428. and "devils" should not be in the same list of synonyms (singular noun and plural noun), but "demon" and "devil"
  429. could be (each is a singular noun). The Strings in synonyms should all be lower-case, since case is picked up
  430. from the text as it is being replaced and not from the words themselves. Proper nouns should normally not be used
  431. as synonyms, since this could get very confusing if it changed occurrences of "Germany" to "France" at random and
  432. a character's name, like "Dorothy", to "Anne", "Emily", "Cynthia", etc. in the middle of a section about Dorothy.
  433. The word matching pattern this uses only matches all-letter words, not words that contain hyphens, apostrophes,
  434. or other punctuation.</div>
  435. <dl>
  436. <dt><span class="paramLabel">Parameters:</span></dt>
  437. <dd><code>synonyms</code> - a Collection of lower-case Strings with similar meaning and the same part of speech</dd>
  438. <dt><span class="returnLabel">Returns:</span></dt>
  439. <dd>this for chaining</dd>
  440. </dl>
  441. </li>
  442. </ul>
  443. <a name="addCategory-java.lang.String-java.util.Collection-">
  444. <!-- -->
  445. </a>
  446. <ul class="blockList">
  447. <li class="blockList">
  448. <h4>addCategory</h4>
  449. <pre>public&nbsp;<a href="../squidpony/Thesaurus.html" title="class in squidpony">Thesaurus</a>&nbsp;<a href="../src-html/squidpony/Thesaurus.html#line.103">addCategory</a>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;keyword,
  450. <a href="http://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;synonyms)</pre>
  451. <div class="block">Allows this Thesaurus to replace a specific keyword, typically containing multiple backtick characters ('`') so
  452. it can't be confused with a "real word," with one of the words in synonyms (chosen in shuffled order). The
  453. backtick is the only punctuation character that this class' word matcher considers part of a word, both for this
  454. reason and because it is rarely used in English text.</div>
  455. <dl>
  456. <dt><span class="paramLabel">Parameters:</span></dt>
  457. <dd><code>keyword</code> - a word (typically containing backticks, '`') that will be replaced by a word from synonyms</dd>
  458. <dd><code>synonyms</code> - a Collection of lower-case Strings with similar meaning and the same part of speech</dd>
  459. <dt><span class="returnLabel">Returns:</span></dt>
  460. <dd>this for chaining</dd>
  461. </dl>
  462. </li>
  463. </ul>
  464. <a name="addKnownCategories--">
  465. <!-- -->
  466. </a>
  467. <ul class="blockList">
  468. <li class="blockList">
  469. <h4>addKnownCategories</h4>
  470. <pre>public&nbsp;<a href="../squidpony/Thesaurus.html" title="class in squidpony">Thesaurus</a>&nbsp;<a href="../src-html/squidpony/Thesaurus.html#line.185">addKnownCategories</a>()</pre>
  471. <div class="block">Adds several pre-made categories to this Thesaurus' known categories, but won't cause it to try to replace normal
  472. words with synonyms (only categories, which contain backticks in the name). The keywords this currently knows,
  473. and the words it will replace those keywords with, are:
  474. <br>
  475. <ul>
  476. <li>"calm`adj`": harmonious, peaceful, pleasant, serene, placid, tranquil, calm</li>
  477. <li>"calm`noun`": harmony, peace, kindness, serenity, tranquility, calm</li>
  478. <li>"org`noun`": fraternity, brotherhood, order, group, foundation, association, guild, fellowship, partnership</li>
  479. <li>"org`nouns`": fraternities, brotherhoods, orders, groups, foundations, associations, guilds, fellowships, partnerships</li>
  480. <li>"empire`adj`": imperial, prince's, king's, sultan's, regal, dynastic, royal, hegemonic, monarchic, ascendant, emir's, lordly</li>
  481. <li>"empire`noun`": empire, emirate, kingdom, sultanate, dominion, dynasty, imperium, hegemony, triumvirate, ascendancy, monarchy, commonwealth</li>
  482. <li>"empire`nouns`": empires, emirates, kingdoms, sultanates, dominions, dynasties, imperia, hegemonies, triumvirates, ascendancies, monarchies, commonwealths</li>
  483. <li>"union`adj`": united, allied, people's, confederated, federated, congressional, independent, associated, unified, democratic</li>
  484. <li>"union`noun`": union, alliance, coalition, confederation, federation, congress, confederacy, league, faction, republic</li>
  485. <li>"union`nouns`": unions, alliances, coalitions, confederations, federations, congresses, confederacies, leagues, factions, republics</li>
  486. <li>"militia`noun`": rebellion, resistance, militia, liberators, warriors, fighters, militants, front, irregulars</li>
  487. <li>"militia`nouns`": rebellions, resistances, militias, liberators, warriors, fighters, militants, fronts, irregulars</li>
  488. <li>"gang`noun`": gang, syndicate, mob, crew, posse, mafia, cartel</li>
  489. <li>"gang`nouns`": gangs, syndicates, mobs, crews, posses, mafias, cartels</li>
  490. <li>"duke`noun`": duke, earl, baron, fief, lord, shogun</li>
  491. <li>"duke`nouns`": dukes, earls, barons, fiefs, lords, shoguns</li>
  492. <li>"duchy`noun`": duchy, earldom, barony, fiefdom, lordship, shogunate</li>
  493. <li>"duchy`nouns`": duchies, earldoms, baronies, fiefdoms, lordships, shogunates</li>
  494. <li>"magical`adj`": arcane, enchanted, sorcerous, ensorcelled, magical, mystical</li>
  495. <li>"holy`adj`": auspicious, divine, holy, sacred, prophetic, blessed, godly</li>
  496. <li>"unholy`adj`": bewitched, occult, unholy, macabre, accursed, profane, vile</li>
  497. <li>"forest`adj`": natural, primal, verdant, lush, fertile, bountiful</li>
  498. <li>"forest`noun`": nature, forest, greenery, jungle, woodland, grove, copse</li>
  499. <li>"fancy`adj`": grand, glorious, magnificent, magnanimous, majestic, great, powerful</li>
  500. <li>"evil`adj`": heinous, scurrilous, terrible, horrible, debased, wicked, evil, malevolent, nefarious, vile</li>
  501. <li>"good`adj`": righteous, moral, good, pure, compassionate, flawless, perfect</li>
  502. <li>"sinister`adj`": shadowy, silent, lethal, deadly, fatal, venomous, cutthroat, murderous, bloodstained, stalking</li>
  503. <li>"sinister`noun`": shadow, silence, assassin, ninja, venom, poison, snake, murder, blood, razor, tiger</li>
  504. <li>"blade`noun`": blade, knife, sword, axe, stiletto, katana, scimitar, hatchet, spear, glaive, halberd,
  505. hammer, maul, flail, mace, sickle, scythe, whip, lance, nunchaku, saber, cutlass, trident</li>
  506. <li>"bow`noun`": bow, longbow, shortbow, crossbow, sling, atlatl, bolas, javelin, net, shuriken, dagger</li>
  507. <li>"weapon`noun`": blade, knife, sword, axe, stiletto, katana, scimitar, hatchet, spear, glaive, halberd,
  508. hammer, maul, flail, mace, sickle, scythe, whip, lance, nunchaku, saber, cutlass, trident,
  509. bow, longbow, shortbow, crossbow, sling, atlatl, bolas, javelin, net, shuriken, dagger</li>
  510. <li>"musket`noun`": arquebus, blunderbuss, musket, matchlock, flintlock, wheellock, cannon</li>
  511. <li>"grenade`noun`": rocket, grenade, missile, bomb, warhead, explosive, flamethrower</li>
  512. <li>"rifle`noun`": pistol, rifle, handgun, firearm, longarm, shotgun</li>
  513. <li>"blade`nouns`": blades, knives, swords, axes, stilettos, katana, scimitars, hatchets, spears, glaives, halberds,
  514. hammers, mauls, flails, maces, sickles, scythes, whips, lances, nunchaku, sabers, cutlasses, tridents</li>
  515. <li>"bow`nouns`": bows, longbows, shortbows, crossbows, slings, atlatls, bolases, javelins, nets, shuriken, daggers</li>
  516. <li>"weapon`nouns`": blades, knives, swords, axes, stilettos, katana, scimitars, hatchets, spears, glaives, halberds,
  517. hammers, mauls, flails, maces, sickles, scythes, whips, lances, nunchaku, sabers, cutlasses, tridents,
  518. bows, longbows, shortbows, crossbows, slings, atlatls, bolases, javelins, nets, shuriken, daggers</li>
  519. <li>"musket`nouns`": arquebusses, blunderbusses, muskets, matchlocks, flintlocks, wheellocks, cannons</li>
  520. <li>"grenade`nouns`": rockets, grenades, missiles, bombs, warheads, explosives, flamethrowers</li>
  521. <li>"rifle`nouns`": pistols, rifles, handguns, firearms, longarms, shotguns</li>
  522. <li>"tech`adj`": cyber, digital, electronic, techno, hacker, crypto, turbo, mechanical, servo</li>
  523. <li>"sole`adj`": sole, true, singular, total, ultimate, final, last</li>
  524. <li>"light`adj`": bright, glowing, solar, stellar, lunar, radiant, luminous, shimmering</li>
  525. <li>"light`noun`": light, glow, sun, star, moon, radiance, dawn, torch</li>
  526. <li>"light`nouns`": lights, glimmers, suns, stars, moons, torches</li>
  527. <li>"smart`adj`": brilliant, smart, genius, wise, clever, cunning, mindful, aware</li>
  528. <li>"smart`noun`": genius, wisdom, cunning, awareness, mindfulness, acumen, smarts, knowledge</li>
  529. <li>"bandit`noun`": thief, raider, bandit, rogue, brigand, highwayman, pirate</li>
  530. <li>"bandit`nouns`": thieves, raiders, bandits, rogues, brigands, highwaymen, pirates</li>
  531. <li>"guard`noun`": protector, guardian, warden, defender, guard, shield, sentinel, watchman, knight</li>
  532. <li>"guard`nouns`": protectors, guardians, wardens, defenders, guards, shields, sentinels, watchmen, knights</li>
  533. <li>"rage`noun`": rage, fury, anger, wrath, frenzy, vengeance</li>
  534. </ul>
  535. Capitalizing the first letter in the keyword where it appears in text you call process() on will capitalize the
  536. first letter of the produced fake word. Capitalizing the second letter will capitalize the whole produced fake
  537. word. This applies only per-instance of each keyword; it won't change the internally-stored list of words.</div>
  538. <dl>
  539. <dt><span class="returnLabel">Returns:</span></dt>
  540. <dd>this for chaining</dd>
  541. </dl>
  542. </li>
  543. </ul>
  544. <a name="addFakeWords--">
  545. <!-- -->
  546. </a>
  547. <ul class="blockList">
  548. <li class="blockList">
  549. <h4>addFakeWords</h4>
  550. <pre>public&nbsp;<a href="../squidpony/Thesaurus.html" title="class in squidpony">Thesaurus</a>&nbsp;<a href="../src-html/squidpony/Thesaurus.html#line.233">addFakeWords</a>()</pre>
  551. <div class="block">Adds a large list of words pre-generated by FakeLanguageGen and hand-picked for fitness, and makes them
  552. accessible with a keyword based on the language and any tweaks made to it. The keywords this currently knows:
  553. <br>
  554. <ul>
  555. <li>"jp`gen`": Imitation Japanese</li>
  556. <li>"fr`gen`": Imitation French; contains some accented chars</li>
  557. <li>"gr`gen`": Imitation Greek (romanized)</li>
  558. <li>"ru`gen`": Imitation Russian (romanized)</li>
  559. <li>"sw`gen`": Imitation Swahili</li>
  560. <li>"so`gen`": Imitation Somali</li>
  561. <li>"en`gen`": Imitation English (not very good on its own)</li>
  562. <li>"ar`gen`": Imitation Arabic (better); doesn't have accents and should be more readable</li>
  563. <li>"ar`acc`gen`": Imitation Arabic (worse); has special accents and uses two Greek letters as well</li>
  564. <li>"hi`gen`": Imitation Hindi (romanized and with accents removed)</li>
  565. <li>"fn`gen`": Fantasy Names; styled after the possibly-Europe-like names common in fantasy books</li>
  566. <li>"fn`acc`gen`": Fancy Fantasy Names; the same as "fn`gen`", but with lots of accented chars</li>
  567. <li>"lc`gen`": Lovecraft; styled after the names of creatures from H.P. Lovecraft's Cthulhu Mythos</li>
  568. <li>"ru`so`gen`": Mix of imitation Russian (75%) and Somali (25%)</li>
  569. <li>"gr`hi`gen`": Mix of imitation Greek (50%) and Hindi (accents removed, 50%)</li>
  570. <li>"sw`fr`gen`": Mix of imitation Swahili (70%) and French (30%)</li>
  571. <li>"ar`jp`gen`": Mix of imitation Arabic (accents removed, 60%) and Japanese (40%)</li>
  572. <li>"sw`gr`gen`": Mix of imitation Swahili (60%) and Greek (40%)</li>
  573. <li>"gr`so`gen`": Mix of imitation Greek (60%) and Somali (40%)</li>
  574. <li>"en`hi`gen`": Mix of imitation English (60%) and Hindi (accents removed, 40%)</li>
  575. <li>"en`jp`gen`": Mix of imitation English (60%) and Japanese (40%)</li>
  576. <li>"so`hi`gen`": Mix of imitation Somali (60%) and Hindi (accents removed, 40%)</li>
  577. <li>"ru`gr`gen`": Mix of imitation Russian (60%) and Greek (40%)</li>
  578. <li>"lc`gr`gen`": Mix of Lovecraft-styled names (60%) and imitation Russian (40%)</li>
  579. <li>"fr`mod`gen`": Imitation French; modified to replace doubled consonants like "gg" with "gsh" or similar</li>
  580. <li>"jp`mod`gen`": Imitation Japanese; modified to sometimes double vowels from "a" to "aa" or similar</li>
  581. <li>"so`mod`gen`": Imitation Somali (not really); modified beyond recognition and contains accents</li>
  582. </ul>
  583. Capitalizing the first letter in the keyword where it appears in text you call process() on will capitalize the
  584. first letter of the produced fake word, which is often desirable for things like place names. Capitalizing the
  585. second letter will capitalize the whole produced fake word. This applies only per-instance of each keyword; it
  586. won't change the internally-stored list of words.</div>
  587. <dl>
  588. <dt><span class="returnLabel">Returns:</span></dt>
  589. <dd>this for chaining</dd>
  590. </dl>
  591. </li>
  592. </ul>
  593. <a name="process-java.lang.CharSequence-">
  594. <!-- -->
  595. </a>
  596. <ul class="blockList">
  597. <li class="blockList">
  598. <h4>process</h4>
  599. <pre>public&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../src-html/squidpony/Thesaurus.html#line.252">process</a>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;text)</pre>
  600. <div class="block">Given a String, StringBuilder, or other CharSequence that should contain words this knows synonyms for, this
  601. replaces each occurrence of such a known word with one of its synonyms, leaving unknown words untouched. Words
  602. that were learned together as synonyms with addSynonyms() will be replaced in such a way that an individual
  603. replacement word should not occur too close to a previous occurrence of the same word; that is, replacing the
  604. text "You fiend! You demon! You despoiler of creation; devil made flesh!", where "fiend", "demon", and "devil"
  605. are all synonyms, would never produce a string that contained "fiend" as the replacement for all three of those.</div>
  606. <dl>
  607. <dt><span class="paramLabel">Parameters:</span></dt>
  608. <dd><code>text</code> - a CharSequence, such as a String, that contains words in the source language</dd>
  609. <dt><span class="returnLabel">Returns:</span></dt>
  610. <dd>a String of the translated text.</dd>
  611. </dl>
  612. </li>
  613. </ul>
  614. <a name="lookup-java.lang.String-">
  615. <!-- -->
  616. </a>
  617. <ul class="blockList">
  618. <li class="blockList">
  619. <h4>lookup</h4>
  620. <pre>public&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../src-html/squidpony/Thesaurus.html#line.258">lookup</a>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;word)</pre>
  621. </li>
  622. </ul>
  623. <a name="makeNationName--">
  624. <!-- -->
  625. </a>
  626. <ul class="blockListLast">
  627. <li class="blockList">
  628. <h4>makeNationName</h4>
  629. <pre>public&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../src-html/squidpony/Thesaurus.html#line.313">makeNationName</a>()</pre>
  630. <div class="block">Generates a random possible name for a nation, such as "Iond-Gouccief Alliance" or "The Last Drayo Commonwealth".
  631. Needs <a href="../squidpony/Thesaurus.html#addKnownCategories--"><code>addKnownCategories()</code></a> to be called on this Thesaurus first. May use accented characters, as in
  632. "Thùdshù-Hyóttiálb Hegemony" or "The Glorious Chô Empire"; if you want to strip these out and replace accented
  633. chars with their un-accented counterparts, you can use <a href="../squidpony/FakeLanguageGen.html#removeAccents-java.lang.CharSequence-"><code>FakeLanguageGen.removeAccents(CharSequence)</code></a>, which
  634. returns a CharSequence that can be converted to String if needed. Shortly after calling this method, but before
  635. calling it again, you can retrieve the generated random languages, if any were used while making nation names, by
  636. getting the FakeLanguageGen elements of this class' <a href="../squidpony/Thesaurus.html#randomLanguages"><code>randomLanguages</code></a> field. Using one of these
  637. FakeLanguageGen objects, you can produce many more words with a similar style to the nation name, like "Drayo" in
  638. "The Last Drayo Commonwealth". If more than one language was used in the nation name, as in "Thùdshù-Hyóttiálb
  639. Hegemony", you will have two languages in randomLanguages, so here "Thùdshù" would be generated by the first
  640. language, and "Hyóttiálb" by the second language. Calling this method replaces the current contents of
  641. randomLanguages, so if you want to use those languages, get them while you can.</div>
  642. <dl>
  643. <dt><span class="returnLabel">Returns:</span></dt>
  644. <dd>a random name for a nation or a loose equivalent to a nation, as a String</dd>
  645. </dl>
  646. </li>
  647. </ul>
  648. </li>
  649. </ul>
  650. </li>
  651. </ul>
  652. </div>
  653. </div>
  654. <!-- ========= END OF CLASS DATA ========= -->
  655. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  656. <div class="bottomNav"><a name="navbar.bottom">
  657. <!-- -->
  658. </a>
  659. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  660. <a name="navbar.bottom.firstrow">
  661. <!-- -->
  662. </a>
  663. <ul class="navList" title="Navigation">
  664. <li><a href="../overview-summary.html">Overview</a></li>
  665. <li><a href="package-summary.html">Package</a></li>
  666. <li class="navBarCell1Rev">Class</li>
  667. <li><a href="class-use/Thesaurus.html">Use</a></li>
  668. <li><a href="package-tree.html">Tree</a></li>
  669. <li><a href="../deprecated-list.html">Deprecated</a></li>
  670. <li><a href="../index-files/index-1.html">Index</a></li>
  671. <li><a href="../help-doc.html">Help</a></li>
  672. </ul>
  673. </div>
  674. <div class="subNav">
  675. <ul class="navList">
  676. <li><a href="../squidpony/StringKit.html" title="class in squidpony"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  677. <li><a href="../squidpony/WeightedLetterNamegen.html" title="class in squidpony"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  678. </ul>
  679. <ul class="navList">
  680. <li><a href="../index.html?squidpony/Thesaurus.html" target="_top">Frames</a></li>
  681. <li><a href="Thesaurus.html" target="_top">No&nbsp;Frames</a></li>
  682. </ul>
  683. <ul class="navList" id="allclasses_navbar_bottom">
  684. <li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li>
  685. </ul>
  686. <div>
  687. <script type="text/javascript"><!--
  688. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  689. if(window==top) {
  690. allClassesLink.style.display = "block";
  691. }
  692. else {
  693. allClassesLink.style.display = "none";
  694. }
  695. //-->
  696. </script>
  697. </div>
  698. <div>
  699. <ul class="subNavList">
  700. <li>Summary:&nbsp;</li>
  701. <li>Nested&nbsp;|&nbsp;</li>
  702. <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
  703. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  704. <li><a href="#method.summary">Method</a></li>
  705. </ul>
  706. <ul class="subNavList">
  707. <li>Detail:&nbsp;</li>
  708. <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
  709. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  710. <li><a href="#method.detail">Method</a></li>
  711. </ul>
  712. </div>
  713. <a name="skip.navbar.bottom">
  714. <!-- -->
  715. </a></div>
  716. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  717. <p class="legalCopy"><small>Copyright &#169; 2012&#x2013;2016. All rights reserved.</small></p>
  718. </body>
  719. </html>