Yahoo! SearchMonkey のセマンティック構造記述例|LOCAL
SearchMonkey - Localのまとめメモ。
レストランとかの店舗情報をセマンティックする書き方。microformats対応の書式があるので導入しやすそう。まとめてて思ったけど、RDFaってかなりハードル高そう。属性が typeof だったり property だったり rel だったり、法則がまだつかめない。
- 注意
-
- 超訳なので、少し日本語おかしいところがありますが、英語レベル低いため正しく書こうとすると分かりにくくなっちゃうのでそのままにしています。
- あまりセマンティックの知識ないんで、サンプルを見ながら学習しています。なので全然見当違いのことを書いているかもしれません。ごめんなさい。
表示内容
企業・組織・特定の場所(お店?)
反映時間
マークアップが正しければ、リクロールの際に enhanced result が表示される。
サイトによっては数日〜数週間の間。
方法
マークアップ
RDFaで直接メタデータマークアップ。名前、住所、写真、レイティングなどが可能。
hcard / hreviewでマークアップ
DaraRSS XMLでYahoo!へデータを送る。
RDFa
REQUIRED
RECOMMENDED
- xmlns:rdfs (url):RDFSネームスペース。ラベルやコメントに使われる。
- vcard:fn rdfs:label (string):"Steven's Cheesesteaks"のような地方リストの名前。フォーマットは60文字以内の文字列。
- vcard:label rdfs:label (string):シンプルかつ自由形式の住所。local listingは文字列、もしくはvcard:street-addressのような形式の住所を含まないといけない。形式を持った住所の方が優先される。フォーマットは60文字以内の文字列、もしくはvcard:street-addressとvcard:postal-codeのような形式。
- vcard:tel (string):国際標準形式の電話番号。フォーマットは20文字以内の文字列。
OPTIONAL
- xmlnas:review (url): RDF Reviewネームスペース。レビュー表示がある場合のみに使用。valueは定型:"http://purl.org/stuff/rev#"
- xmlns:xsd (url):XMLスキーマネームスペース。xsd:float や xsd:integer のようなフォーマットがあるときにのみ使われる。validは定型:"http://www.w3.org/2001/XMLSchema#"
- rdfs:comment (string):vcard:VCardとcommerce:Business内では、地域の説明に使われる。最大200文字がフォーマット。
- vcard:street-address (string) :"2700 Mission College Blvd"のような住所。最大60文字がフォーマット。
- vcard:locality (string):cityなど地域をあらわす。最大20文字がフォーマット。
- vcard:region (string):state / provinceなど広域を表す。最大20文字がフォーマット。
- vcard:postal-code (string):郵便番号。最大20文字がフォーマット。
- vcard:country-name (string):国名。最大20文字がフォーマット。
- vcard:latitude (float):緯度。正確な値はcontent属性で指定できる。フォーマットは浮動小数形式。
- vcard:longitude (float):経度。 正確な値はcontent属性で指定できる。フォーマットは浮動小数形式。
- vcard:photo (gif, jpg, png):対象を表す画像。基本的にビルの外観画像が当てはまる。代替として組織のロゴを表すのにvcard:logoが使われる。[注意]無関係な画像や、広告めいた画像はCTRにネガティブインパクトを与える。フォーマットはGIF/PNG/JPGなどへのURL。画像は検索結果と同じドメインにないといけない。また、画像サイズは85x65。
- vcard:url (url):対象に関連するURL。基本的には組織のサイトへのリンクになる。
- review:rating(float):総レビューのレイティング値。デフォルトでは0-5の値。Yahoo!ではスターで表現する(半スターもあり)。ここには総レビューの値が入る。もし複数のレイティングがある場合、Yahoo!ではレビューを表示しない。
- review:minRating(integer):レビューの最低点数。デフォルトは0。もし最低値が明示されていれば、Yahoo!ではスター表示よりも提示されたレイティングのほうを表示する。review:maxRatingよりも低い数字であることが条件。
- review:maxRating(integer):レビューの最高点数。デフォルトは5。もし最高値が明示されていれば、Yahoo!ではスター表示よりも提示されたレイティングのほうを表示する。review:minRatingよりも高い数字であることが条件。
- review:totalRatings(integer):ユーザーレビューの総評価。
- commerce:hoursOfOperation (string):営業時間(自由形式)。フォーマットは60文字以内。
- commerce:priceRange (float):レストラン・ホテル・ショッピングセンターなどの相対価格を表す。デフォルトでは0-5。commerce:priceRangeHighest と commerce:priceRageLowest を定義することで上書きできる。
- commerce:parkingOptions (string):駐車場があるかどうか。
- commerce:attire (string):"Casual"や"Formal"などのドレスコード。
- commerce:businessCatagory (string):"retail"や"winery"など、カテゴリー。
- commerce:cuisine (string):"Italian"など、可能な料理カテゴリ。
サンプル1
<div typeof="vcard:VCard commerce:Business" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:vcard="http://www.w3.org/2006/vcard/ns#" xmlns:commerce="http://search.yahoo.com/searchmonkey/commerce/"> <span property=" rdfs:label vcard:fn">Parcel 104</span> <div rel="vcard:adr"> <div typeof="vcard:Address"> <span property="rdfs:label">2700 Mission College Blvd, Santa Clara, CA 95054</span> </div> </div> <span property=" vcard:tel">+1 408 970-6104</span> </div>
サンプル2
<div typeof="vcard:VCard commerce:Business" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:vcard="http://www.w3.org/2006/vcard/ns#" xmlns:commerce="http://search.yahoo.com/searchmonkey/commerce/" xmlns:review="http://purl.org/stuff/rev#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#"> <span property=" rdfs:label vcard:fn">Parcel 104</span> <span property=" rdfs:comment"> A collaborative venture of renowned chefs, Bradley Ogden and Robert Sapirman. The American-themed menu celebrates seasonal delights and showcases the finest efforts of local growers, ranches and dairies. </span> <div rel=" vcard:adr"> <div typeof="vcard:Address"> <!-- If address is not available in parsed form, use rdfs:label as seen in Example 1 --> <span property="vcard:street-address">2700 Mission College Blvd</span> <span property="vcard:locality">Santa Clara</span> <span property="vcard:region">CA</span> <span property="vcard:postal-code">95054</span> <span property="vcard:country-name">United States</span> </div> </div> <span property=" vcard:tel">1 408 970-6104</span> <div rel="vcard:geo"> <span property=" vcard:latitude" datatype="xsd:float">37.392326</span> <span property="vcard:longitude" datatype="xsd:float">-121.974426</span> </div> <span rel=" vcard:photo"> <img src="http://example.com/restaurant.jpg"/> </span> <a rel=" vcard:url" href="http://www.parcel104.com">Parcel 104</a> <!-- Review --> <div rel=" review:hasReview"> <div typeof="review:Review"> Rated <span property="review:rating" datatype="xsd:float">3.5</span> on a scale of <span property="review:minRating" datatype="xsd:integer">1</span> to <span property="review:maxRating" datatype="xsd:integer">5</span> Rated <span property="review:totalRatings" datatype="xsd:integer">14</span> times. </div> </div> <span property=" commerce:hoursOfOperation">Breakfast daily, Lunch Mon.-Fri., Dinner Mon.-Sat.</span> <span property="commerce:priceRange">3</span> <span property="commerce:parkingOptions">Valet parking & parking lot</span> <span property="commerce:attire">Business casual</span> <span property="commerce:businessCategory">Restaurants, American Restaurants</span> <span property="commerce:cuisine">American</span> </div>
Microformats
REQUIRED
- item vcard (string):以下が住所カードであることを示す。
- fn org summary (string):"Stenen's Cheesesteaks"のような、店舗の名前。フォーマットは60文字以内。
RECOMMENDED
- tel (string):国際標準形式の電話番号。フォーマットは20文字以内の文字列。
- street-address (string):"2700 Mission College Blvd"のような住所。最大60文字がフォーマット。
- locality (string):cityなど地域をあらわす。最大20文字がフォーマット。
- region (string) :state / provinceなど広域を表す。最大20文字がフォーマット。
- postal-code (string) :郵便番号。最大20文字がフォーマット。
OPTIONAL
- country-name (string):国名。20文字以内。
- latitude (float):緯度。正確な値はtitle属性で指定できる。フォーマットは浮動少数形式。
- longitude (float):経度。正確な値はtitle属性で指定できる。 フォーマットは浮動少数形式。
- description (string):店舗の説明。フォーマットは200文字以内。
- photo (gif, jpg, png) :対象を表す画像。基本的にビルの外観画像が当てはまる。代替として組織のロゴを表すのにvcard:logoが使われる。[注意]無関係な画像や、広告めいた画像はCTRにネガティブインパクトを与える。フォーマットはGIF/PNG/JPGなどへのURL。画像は検索結果と同じドメインにないといけない。また、画像サイズは85x65。
- url (url):対象に関連するURL。基本的には組織のサイトへのリンクになる。
- rating (float):総レビューのレイティング値。デフォルトでは0-5の値。Yahoo!ではスターで表現する(半スターもあり)。ここには総レビューの値が入る。もし複数のレイティングがある場合、Yahoo!ではレビューを表示しない。
- worst (integer):レビューの最低点数。デフォルトは0。もし最低値が明示されていれば、Yahoo!ではスター表示よりも提示されたレイティングのほうを表示する。review:maxRatingよりも低い数字であることが条件。
- best (integer):レビューの最高点数。デフォルトは5。もし最高値が明示されていれば、Yahoo!ではスター表示よりも提示されたレイティングのほうを表示する。review:minRatingよりも高い数字であることが条件。
- num (integer):ユーザーレビューの総評価。
サンプル1
<div class="vcard"> <div class="fn org summary">Parcel 104</div> <span class="adr"> <span class="street-address">2700 Mission College Blvd</span>, <span class="locality">Santa Clara</span>, <span class="region">CA</span> <span class="postal-code">95054</span>, </span> <span class="tel">+1 408 970-6104</span>; </div>
サンプル2
<div class="hreview"> <div class="item vcard"> <div class="fn org summary">Parcel 104</div> <span class="adr"> <span class="street-address">2700 Mission College Blvd</span>, <span class="locality">Santa Clara</span>, <span class="region">CA</span> <span class="postal-code">95054</span>, </span> <img class="photo" alt="Parcel 104 exterior" src="http://www.parcel104.com/wp-content/uploads/2009/03/photo175.jpg"/> <span class="tel">+1 408 970-6104</span>; <a class="url" href="http://www.parcel104.com">parcel104.com</a> <div class=" geo"> <abbr class="latitude" title="37.408183">51.514828</abbr> <abbr class="longitude" title="-122.13855">-0.122604</abbr> </div> </div> <div class="hreview haggregatereview"> Rated <span class="rating">4.5</span> out of <span class="best">5</span> stars based on <span class="num"> 29</span>ratings. </div> <div class="description"><p> Parcel 104 is a collaborative venture of renowned chefs, Bradley Ogden and Robert Sapirman. The American-themed menu celebrates seasonal delights and showcases the finest efforts of local growers, ranches and dairies. </p></div> </div>