検索用語を入力
検索フォームを送信
my-Tool.com: ワードドメイン - ドメイン名などいろいろな目的に使用できる単語を生成して組み合わせる。 - ランダムワード
IPアドレス
MaximaPHP
正規表現テスタ
数学
ゲーム
ネットワーク
インターネットコード
日付と時間
文字列とテキスト
ワードドメイン
コードテスタ
ビーワイズビット
ランキン
質問と答え
僕について
フォーラム
AdManner
無料広告サイト
インドネシア語
英語
ドメイン検証
ワードピッカー
ランダムワード
ドメイン組み合わせ
ランダムワード
指定された長さと母音数で読むことの可能なランダムな単語を生成する。
長さ
:
和式
洋式
母音数
:
連続母音数
:
連続子音数
:
単語数
:
列数
:
このツールを利用したほとんどのお客様は以下のツールも利用しました。
最終更新
(56.1%),
MaximaPHP
(2.4%),
Forum
(1.6%)
このツールのソースコードは以下に示す。
<?php /****************************************************************** * * RandomWord, 指定された長さと母音数で読むことの可能なランダムな単語を生成する。 * Copyright (C) 2006, Bowo Prasetyo * * http://www.my-tool.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation below, * * http://www.gnu.org/licenses/gpl.html#TOC1 * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. * * このプログラムはフリーソフトウェアです。あなたはこれを、以下のURLにフリーソフトウェ * ア財団によって発行された GNU 一般公衆利用許諾契約書の定める条件の下で * 再頒布または改変することができます。 * * http://www.gnu.org/licenses/gpl.html#TOC1 * * このプログラムは有用であることを願って頒布されますが、*全くの無保証* * です。商業可能性の保証や特定の目的への適合性は、言外に示されたものも含 * め全く存在しません。詳しくはGNU 一般公衆利用許諾契約書をご覧ください。 * * あなたはこのプログラムと共に、GNU 一般公衆利用許諾契約書の複製物を一部 * 受け取ったはずです。もし受け取っていなければ、フリーソフトウェア財団ま * で請求してください(宛先は the Free Software Foundation, Inc., 59 * Temple Place, Suite 330, Boston, MA 02111-1307 USA)。 * *****************************************************************/ $length = 9; if (isset($_POST['length'])) $length = trim($_POST['length']); $style = 'pure'; if (isset($_POST['style'])) $style = $_POST['style']; $vowels = 3; if (isset($_POST['vowels'])) $vowels = trim($_POST['vowels']); $cvowels = 1; if (isset($_POST['cvowels'])) $cvowels = trim($_POST['cvowels']); $cconsonants = 2; if (isset($_POST['cconsonants'])) $cconsonants = trim($_POST['cconsonants']); $count = 99; if (isset($_POST['count'])) $count = trim($_POST['count']); $columns = 3; if (isset($_POST['columns'])) $columns = trim($_POST['columns']); ?> <script src="/randomword.js"> </script> <form name="my_tool_form" method="POST" action=""> <table border=0> <tr><td>長さ</td><td>:</td><td><input type="text" size="3" maxlength="2" name="length" value="<?php echo $length ?>"></td></tr> <tr><td colspan="3"><input type="radio" name="style" value="japanese" <?php echo $style=='japanese'?'checked':'' ?>> 和式</td></tr> <tr><td colspan="3" class="top_right_left_bottom"> <input type="radio" name="style" value="pure" <?php echo $style=='pure'?'checked':'' ?>> 洋式<br> <table><tr><td>母音数</td><td>:</td><td><input type="text" size="3" maxlength="2" name="vowels" value="<?php echo $vowels ?>"></td></tr> <tr><td>連続母音数</td><td>:</td><td><input type="text" size="3" maxlength="2" name="cvowels" value="<?php echo $cvowels ?>"></td></tr> <tr><td>連続子音数</td><td>:</td><td><input type="text" size="3" maxlength="2" name="cconsonants" value="<?php echo $cconsonants ?>"> </td></tr></table> </td></tr> <tr><td colspan="3"> <table> <tr><td>単語数</td><td>:</td><td><input type="text" size="3" maxlength="3" name="count" value="<?php echo $count ?>"></td> <td>列数</td><td>:</td><td><input type="text" size="3" maxlength="3" name="columns" value="<?php echo $columns ?>"></td></tr> </table> </td></tr> </table> <input type="button" value="生成する" onClick="generateRandomWords(this.form.length.value, this.form.style, this.form.vowels.value, this.form.cvowels.value, this.form.cconsonants.value, this.form.count.value, this.form.columns.value)"> </form> <form name="my_tool_form_2" method="POST" action="/ja/word-domain/domain-combiner/"> <textarea name="result" rows="20" cols="60" style="border:none" wrap="off" readonly></textarea><br> <input type="submit" value="ドメイン組み合わせへ持っていく"> </form> <br> <?php ?>
'randomword.js'のソースコードは以下に示す。
<!-- hide /****************************************************************** * * randomword.js, Generates random readable words with specified length and vowel number. * Copyright (C) 2006, Bowo Prasetyo * * http://www.my-tool.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation below, * * http://www.gnu.org/licenses/gpl.html#TOC1 * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. * *****************************************************************/ var vowcodes = new Array(97, 101, 105, 111, 117, 121); var jpalpha = new Array( 'a', 'i', 'u', 'e', 'o', 'ka', 'ki', 'ku', 'ke', 'ko', 'ga', 'gi', 'gu', 'ge', 'go', 'kya', 'kyu', 'kyo', 'gya', 'gyu', 'gyo', 'sa', 'shi', 'su', 'se', 'so', 'za', 'ji', 'zu', 'ze', 'zo', 'sha', 'shu', 'sho', 'jya', 'jyu', 'jyo', 'ta', 'chi', 'tsu', 'te', 'to', 'da', 'ji', 'zu', 'de', 'do', 'na', 'ni', 'nu', 'ne', 'no', 'nyo', 'ha', 'hi', 'fu', 'he', 'ho', 'ba', 'bi', 'bu', 'be', 'bo', 'pa', 'bi', 'pu', 'pe', 'po', 'hya', 'hyo', 'bya', 'byo', 'pya', 'pyo', 'ma', 'mi', 'mu', 'me', 'mo', 'mya', 'myo', 'ya', 'yu', 'yo', 'ra', 'ri', 'ru', 're', 'ro', 'rya', 'ryu', 'ryo', 'wa', 'n', 'n', 'n', 'n', 'n'); function inArray(needle, haystack) { var i; var result = false; for(i=0; i<haystack.length; i++) { if (haystack[i]==needle) { result = true; break; } } return result; } function randJapanese(length) { var word = ''; var last = ''; var code; var current; var i; for(i=0; i<length; i++) { code = Math.floor(Math.random()*98); while (((i===0 || last=='n') && jpalpha[code]=='n') || (jpalpha[code]=='bya' && last!='b') || ((jpalpha[code]=='pa' || jpalpha[code]=='pi' || jpalpha[code]=='pu' || jpalpha[code]=='pe' || jpalpha[code]=='po' || jpalpha[code]=='pya' || jpalpha[code]=='pyo') && last!='p')) code = Math.floor(Math.random()*98); current = jpalpha[code]; if (last=='n' && (current=='a' || current=='i' || current=='u' || current=='e' || current=='o')) word += '-' + current; else word += current; last = current; } return word; } function randWord(length, vowels, cvowels, cconsonants) { var word = ''; var vows = 0; var cons = 0; var cvows = 0; var ccons = 0; var consonants = length - vowels; var i = 0; var code; while(i < length) { // a + Math.floor(Math.random()*(b-a+1)); code = 97 + Math.floor(Math.random()*26); if (inArray(code, vowcodes)) { vows++; if (vows<=vowels) { if (cvows<cvowels || cons>consonants) { word += String.fromCharCode(code); ccons = 0; cvows++; i++; } else { vows--; } } } else { cons++; if (cons<=consonants) { if (ccons<cconsonants || vows>vowels) { word += String.fromCharCode(code); cvows = 0; ccons++; i++; } else { cons--; } } } } return word; } function generateRandomWords(length, style, vowels, cvowels, cconsonants, count, columns) { if (length!=undefined) length = length * 1; if (vowels!=undefined) vowels = vowels * 1; if (cvowels!=undefined) cvowels = cvowels * 1; if (cconsonants!=undefined) cconsonants = cconsonants * 1; if (count!=undefined) count = count * 1; if (columns!=undefined) columns = columns * 1; var result = ''; var i, j; for (i=0; i<style.length; i++) { if (style[i].checked) { style = style[i].value; break; } } if (length>0 && count>0) { i = 0; if (style=='pure' && vowels>0 && cvowels>0 && cconsonants>0 && columns>0) { while(i < count) { for(j = 0; j < columns-1 && i < count; j++) { result += randWord(length, vowels, cvowels, cconsonants) + "\t"; i++; } if (i < count) { result += randWord(length, vowels, cvowels, cconsonants) + "\n"; i++; } } } else if(style=='japanese') { while(i < count) { for(j = 0; j < columns-1 && i < count; j++) { result += randJapanese(length) + "\t"; i++; } if (i < count) { result += randJapanese(length) + "\n"; i++; } } } } window.document.my_tool_form_2.result.value = result; } // unhide -->
©2006 my-Tool.com