<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>大阪弁 | ウダ2Blog</title>
	<atom:link href="https://uda2.com/blog/tag/%E5%A4%A7%E9%98%AA%E5%BC%81/feed/" rel="self" type="application/rss+xml" />
	<link>https://uda2.com/blog</link>
	<description>大阪でフリーランスとしてWEB制作している管理人が気になった技術をメモったり、作ったツールの紹介などを綴っているブログです。</description>
	<lastBuildDate>Sun, 10 May 2015 00:16:09 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
	<item>
		<title>大阪弁変換</title>
		<link>https://uda2.com/blog/osaka/</link>
					<comments>https://uda2.com/blog/osaka/#respond</comments>
		
		<dc:creator><![CDATA[uda2]]></dc:creator>
		<pubDate>Sun, 10 May 2015 00:16:09 +0000</pubDate>
				<category><![CDATA[制作日記]]></category>
		<category><![CDATA[変換]]></category>
		<category><![CDATA[大阪弁]]></category>
		<category><![CDATA[関西弁]]></category>
		<guid isPermaLink="false">http://uda2.com/blog/?p=1949</guid>

					<description><![CDATA[<p>こすられまくったコンテンツだけど自動で大阪弁に変換するAPIが必要で探したが、うまく変換出来なかったり、APIが公開されてなかったりしたので自作することになりまして、一般公開する気は無かったんですが少し前に進撃の巨人の関</p>
The post <a href="https://uda2.com/blog/osaka/">大阪弁変換</a> first appeared on <a href="https://uda2.com/blog">ウダ2Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>こすられまくったコンテンツだけど自動で大阪弁に変換するAPIが必要で探したが、うまく変換出来なかったり、APIが公開されてなかったりしたので自作することになりまして、一般公開する気は無かったんですが少し前に進撃の巨人の関西弁版が流行ったりしてたので公開する事にしました。<br />
<span id="more-1949"></span><br />
プログラム的にはシンプルにPHPで文字置換してるだけで特に難しいことはしてはないけど、強いて言えば一回変換した文字を再度別の単語で置換してしまわないように一度文字間にタブを入れたのだけど下記のように<a href="http://php.net/manual/ja/function.preg-split.php" target="_blank">preg_split</a>の独特な方法でマルチバイトの文字を1文字ずつ切り分けてます。</p>
<pre><code>function butubutu($str){
	$buffs = preg_split("//u", $str, -1, PREG_SPLIT_NO_EMPTY);
	return implode("\t",$buffs);
}</code></pre>
<p>デザイン的にはすぐに思いついたけど実装するのは少し面倒だった。<br />
たこ焼きボタンは以前作ったのを流用して楊枝が突き刺さるアニメーションを追加した。<br />
下部の大阪の町並みのシルエット画像は<a href="http://www.無料イラスト素材.com/data/city.php" target="_blank">都市・街並みの無料シルエット</a>をベースに大阪風の建物（大阪城・スカイビル・通天閣・太陽の塔・海遊館・HEPの観覧車）のシルエットを作って配置しました。</p>
<p>大阪弁辞書登録申請のフォームはGoogleフォームを使いました。実験はした事ありましたが実際のサービスに付けるのは始めてです。簡単にセキュアなフォームが作れてオススメです。Googleフォームの実装は<a href="http://ascii.jp/elem/000/000/879/879412/" target="_blank">ASCII.jp：Googleフォームで自動返信システムをサクッとつくる</a>を参考にさせてもらいました。</p>
<p>あとは、ひたすら適当な文章を入れ変換し辞書を修正という作業をして完成しました。今回のWEBサービス作成で時間が一番掛かったのはこの辞書登録でプログラムとデザイン合わせて丸一日で作ったのに辞書作成に丸二日かかった。それでも不完全なので今後もちょいちょい追加していく必要がありそうです。</p>
<p><a href="http://osaka.uda2.com/" target="_blank">大阪弁変換</a></p>The post <a href="https://uda2.com/blog/osaka/">大阪弁変換</a> first appeared on <a href="https://uda2.com/blog">ウダ2Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://uda2.com/blog/osaka/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
