벅스, 독립영화 상영
iPhone 에서 작성된 글입니다.
'끄적끄적' 카테고리의 다른 글
인디필름 주간 편성표 (0) | 2011.05.10 |
---|---|
'리워드 펀딩' (0) | 2011.05.10 |
EBS 다큐 프라임 <잠> (0) | 2011.05.09 |
영화 <미안해, 고마워> 예고편 (0) | 2011.05.08 |
한국영상자료원, 발굴, 복원 그리고 초기영화로의 초대 (0) | 2011.05.08 |
|
인디필름 주간 편성표 (0) | 2011.05.10 |
---|---|
'리워드 펀딩' (0) | 2011.05.10 |
EBS 다큐 프라임 <잠> (0) | 2011.05.09 |
영화 <미안해, 고마워> 예고편 (0) | 2011.05.08 |
한국영상자료원, 발굴, 복원 그리고 초기영화로의 초대 (0) | 2011.05.08 |
'리워드 펀딩' (0) | 2011.05.10 |
---|---|
벅스, 독립영화 상영 (0) | 2011.05.10 |
영화 <미안해, 고마워> 예고편 (0) | 2011.05.08 |
한국영상자료원, 발굴, 복원 그리고 초기영화로의 초대 (0) | 2011.05.08 |
유쾌발랄 [종로의 기적] 티저포스터 (0) | 2011.05.08 |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
파이널 컷 프로를 사면 아비드가 따라온다? (0) | 2011.04.12 |
---|---|
final cut pro 영상 (0) | 2009.02.05 |
[관용어] donner sa langue au chat: 고양이에게 혀/말을 주다 → 단념하다 (0) | 2011.05.11 |
---|---|
RIPOUX] BOUFFER: 쳐묵쳐묵하다 (0) | 2011.05.10 |
관계대명사 (0) | 2011.05.08 |
Dictionary app 을 활용한 개인 사전 만들기 (0) | 2011.05.07 |
[매일매일] 2011년 5월 7일 (0) | 2011.05.07 |
저널리스트가 봐야 할 영화 10선 (0) | 2015.02.02 |
---|---|
언터처블_1%의 기적 드라마로 제작 (0) | 2015.01.21 |
^^ 게임~~ (0) | 2011.05.07 |
10센티 - 아메리카노 ^^ (0) | 2010.10.31 |
너무너무너무 너무 좋아 ㅎ (0) | 2010.10.30 |
벅스, 독립영화 상영 (0) | 2011.05.10 |
---|---|
EBS 다큐 프라임 <잠> (0) | 2011.05.09 |
한국영상자료원, 발굴, 복원 그리고 초기영화로의 초대 (0) | 2011.05.08 |
유쾌발랄 [종로의 기적] 티저포스터 (0) | 2011.05.08 |
부산국제영화제 아시아영화펀드(ACF) (0) | 2011.05.07 |
EBS 다큐 프라임 <잠> (0) | 2011.05.09 |
---|---|
영화 <미안해, 고마워> 예고편 (0) | 2011.05.08 |
유쾌발랄 [종로의 기적] 티저포스터 (0) | 2011.05.08 |
부산국제영화제 아시아영화펀드(ACF) (0) | 2011.05.07 |
Un peu d'orthographe (0) | 2011.05.07 |
영화 <미안해, 고마워> 예고편 (0) | 2011.05.08 |
---|---|
한국영상자료원, 발굴, 복원 그리고 초기영화로의 초대 (0) | 2011.05.08 |
부산국제영화제 아시아영화펀드(ACF) (0) | 2011.05.07 |
Un peu d'orthographe (0) | 2011.05.07 |
Séoul "by night" et à la carte (0) | 2011.05.07 |
RIPOUX] BOUFFER: 쳐묵쳐묵하다 (0) | 2011.05.10 |
---|---|
속담] Quand on n'a pas de tête, il faut avoir des jambes. (0) | 2011.05.08 |
Dictionary app 을 활용한 개인 사전 만들기 (0) | 2011.05.07 |
[매일매일] 2011년 5월 7일 (0) | 2011.05.07 |
[매일매일] 2011년 5월 6일 (0) | 2011.05.07 |
Prior to building a dictionary, you need to create your dictionary source file, prepare a style sheet, edit the property list file, and add any resources needed by your dictionary. This chapter explains how to perform these tasks, provides instructions for building your dictionary, and shows a few simple examples. You’ll also find out how to create a Japanese dictionary, set up preferences, and add front and back matter.
Before you start preparing your source data, copy the project_template
folder from the development kit to the directory that you use for code development. Then, follow the instructions described in the following sections:
Take a look at the MyDictionary.xml
file provided in the project template. Your dictionary should follow this form, using UTF-8 encoding. You can change the file name to something other than MyDictionary
, but if you change the name, you must edit the DICT_SRC_PATH
variable in the makefile.
“Dictionary User Interface and Markup” ) describes the XML schema you should use to develop a dictionary. The schema uses the RELAX NG schema language, which is described on this website:
You should validate your dictionary source prior to building a new dictionary You can use RELAX NG validators programs, which are available from this website:
http://www.relaxng.org/#validators
You can also validate XML using jing as follows:
$ java -jar <path to jing.jar> <schema definition> <XML to validate> |
From the project_template folder, with jing located in ../jing/, the command line is as follows:
$ java -jar ../jing/bin/jing.jar ../documents/DictionarySchema/AppleDictionarySchema.rng MyDictionary.xml |
For more information on jing, see:
You can prepare a style sheet to use for the contents of the dictionary by editing theMyDictionary.css
file provided with the project template. If you change the name of this css file, you need to edit the CSS_PATH
variable in the makefile.
You should minimally edit the style sheet. The Dictionary application and the Dictionary window control use their own style definitions to ensure that the contents fit the display. For best results, do not specify an absolute font or font size.
The property list file for a dictionary is an an XML text file. The project template contains an example file—MyInfo.plist
—whose contents are shown in Listing 2-1. You can edit this file so that it contains entries appropriate for your dictionary. Table 2-1 explains the values that you need to provide for your dictionary.
Listing 2-1 An example of a property list file for a dictionary
<key>CFBundleDevelopmentRegion</key> |
<string>English</string> |
<key>CFBundleDisplayName</key> |
<string>My Dictionary</string> |
<key>CFBundleIdentifier</key> |
<string>com.apple.dictionary.MySample</string> |
<key>CFBundleName</key> |
<string>MyDictionary</string> |
<key>CFBundleShortVersionString</key> |
<string>1.0</string> |
<key>DCSDictionaryCopyright</key> |
<string>Copyright (c) Apple Computer, Inc.</string> |
<key>DCSDictionaryManufacturerName</key> |
<string>Apple Computer, Inc.</string> |
If you change the name of the property list file, you must edit the PLIST_PATH
variable in the makefile.
Key | Value |
---|---|
|
A region |
|
The full display name of the dictionary. The default is to use the file system name. |
|
The identifier of the dictionary bundle; specify a unique ID. |
|
The short display name of the dictionary. |
|
The version of the dictionary. |
|
The copyright notice of the dictionary. |
|
The manufacturer name of the dictionary. |
You must place any resources (for example, images) that your dictionary needs in the OtherResources folder in the project_template
folder. When you build the dictionary, the resources are copied into the built dictionary.
For example, if your dictionary uses an image file name test.png
, you need to place it in the following location:
project_template/OtherResources/Images/test.png
The Images folder is copied into the dictionary. When the dictionary needs the image, it uses to the relative path—Images/test.png
—which is written to the XML file during the build process.
Name your dictionary and then edit the DICT_NAME
variable in the makefile. This name is used as the folder name for the dictionary. For example, when DICT_NAME = "My Dictionary"
, the built dictionary is My Dictionary.dictionary
.
If you change the location of the Dictionary Development Kit from /Developer/Extras/Dictionary Development Kit
, you must modify theDICT_BUILD_TOOL_DIR
variable in the makefile to reflect the change.
To build your dictionary, follow these steps:
Launch the Terminal application.
Use the cd
command to change to the appropriate location:
/Developer/Extras/Dictionary Development Kit
Enter make
.
After the make process finishes successfully, type make install to copy the new dictionary to:
~/Library/Dictionaries/
After running the make install
command, you can delete all the intermediate files in the objects folder. In the Terminal window, enter make clean to remove the objects folder.
Now you can launch the Dictionary application and test your new dictionary.
As you can see from looking at the makefile, the building process uses a scriptbuild_dict.sh
, located in /Developer/Extras/Dictionary Development Kit/bin
. This script takes 4 arguments—dictionary_name
, dictionary_source_path
, StyleSheet_path
, and InfoPlist_path
. It builds a new directory in the /objects
folder.
“Yomi” shows a simple example of a dictionary that contains an entry for the word make. It looks like Figure 1-1 when opened using the Dictionary application.
Listing 2-2 A one-word dictionary
<?xml version="1.0" encoding="UTF-8"?> |
<d:dictionary xmlns="http://www.w3.org/1999/xhtml" xmlns:d="http://www.apple.com/DTDs/DictionaryService-1.0.rng"> |
<d:entry id="make_1"> |
<d:index d:value="make" d:title="make"/> |
<d:index d:value="makes" d:title="makes (make)"/> |
<d:index d:value="made" d:title="made (make)"/> |
<d:index d:value="making" d:title="making (make)"/> |
<h1>make</h1><span class="syntax">| māk |</span> |
<div> |
<ol> |
<li> |
Form by putting parts together or combining substances; construct; create; produce |
<span d:priority="2"> : <i>Mother made her a beautiful dress</i> |
</span> |
. |
</li> |
<li> |
Cause to be or become |
<span d:priority="2"> : <i>The news made me happy</i> |
</span> |
. |
</li> |
</ol> |
</div> |
<div d:parental-control="1" d:priority="2"> |
<h3>PHRASES</h3> |
<div id="make_it"><b>make it</b> : succeed in something; survive.</div> |
<h4><a href="x-dictionary:r:make_up_ones_mind"><b>make up one's mind</b></a></h4> |
</div> |
</d:entry> |
</d:dictionary> |
Listing 2-3 shows how to tag the following content to create an acronym dictionary.
LDAP, Lightweight Directory Access Protocol
MIDI, Musical Instrument Digital Interface
XML, Extensible Markup Language
Listing 2-3 An acronym dictionary
<?xml version="1.0" encoding="UTF-8"?> |
<d:dictionary xmlns="http://www.w3.org/1999/xhtml" xmlns:d="http://www.apple.com/DTDs/DictionaryService-1.0.rng"> |
<d:entry id="ldap"> |
<d:index d:value="LDAP" d:title="LDAP"/> |
<h1>LDAP</h1> |
<p>Lightweight Directory Access Protocol</p> |
</d:entry> |
<d:entry id="midi"> |
<d:index d:value="MIDI" d:title="MIDI"/> |
<h1>MIDI</h1> |
<p>Musical Instrument Digital Interface</p> |
</d:entry> |
<d:entry id="xml"> |
<d:index d:value="XML" d:title="XML"/> |
<h1>XML</h1> |
<p>Extensible Markup Language</p> |
</d:entry> |
</d:dictionary> |
You can add front and back matter to a dictionary by following these steps:
You can view the front and back matter for a dictionary using the Dictionary application. In the Go menu, choose Front/Back Matter.
In the XML file for the dictionary, you need to specify a front-back matter entry using an id
attribute whose value is set to front_back_matter
as shown in the following simple example:
<d:entry id="front_back_matter" d:title="Front/Back Matter"> |
<h1><b>My Dictionary</b></h1> |
<h2>Front/Back Matter</h2> |
<p> |
This is a front matter page of the sample dictionary.<br/> |
</p> |
... |
</d:entry> |
You must modify the property list for the dictionary by adding theDCSDictionaryFrontMatterReferenceID
key to the Info.plist
file. The associated value is a string that specifies the id
value you used in the XML file. The following shows the string used in “Prepare an Entry for the Front and Back Matter.”
<key>DCSDictionaryFrontMatterReferenceID</key> |
<string>front_back_matter</string> |
This example does not use a <d:index>
element, which means that the page won’t show up in a search. If you want the front and back matter to show in a search, add the<d:index>
element. Otherwise, users can view the front and back matters by choosing Go > Front/Back Matter from within the Dictionary application.
You have the option to set up preferences for a dictionary. Users access the preferences settings from within the Dictionary application by choosing Dictionary > Preferences. For example, the New Oxford American Dictionary provided with Mac OS X v10.5 allows users to choose from among three phonetic notations—U.S. English (Diacritical), U.S. English (IPA), or British English (IPA).
This section shows how you can set up preferences for your dictionary. You can find the files associated with this example in the Dictionary Development Kit located in:
/Developer/Extras/Dictionary Development Kit/samples/
To implement dictionary-specific preferences, follow these steps:
You need to modify the contents to support the preferences that you set up. For example, if you want to allow the user to choose from among three phonetic notations, you need to provide the three phonetic notations for each entry in our dictionary. The following example shows three phonetic notations for the word make
.
<d:entry id="make_1" d:title="make"> |
... |
<h1>make</h1> |
<span class="syntax"> |
<span d:pr="US">| māk |</span> |
<span d:pr="US_IPA">| meɪk |</span> |
<span d:pr="UK_IPA">| meɪk |</span> |
</span> |
... |
</d:entry> |
Note that the XML does not specify which phonetic notation to show. You’ll do that in the next section by creating an XSLT file.
The XSLT files contains instructions that Dictionary Services applies to each entry before displaying the it. In this example, you need to provide instructions to remove the unused phonetic notation. For this, use the $pronunciation
variable, which is a global variable supply by the Dictionary application, as shown in the following example.
<xsl:template match="*[@d:pr='US']"> |
<xsl:if test="$pronunciation = '0'"> |
<xsl:copy> |
<xsl:apply-templates select="@*|node()" /> |
</xsl:copy> |
</xsl:if> |
</xsl:template> |
<xsl:template match="*[@d:pr='IPA']"> |
<xsl:if test="$pronunciation = '1'"> |
<xsl:copy> |
<xsl:apply-templates select="@*|node()" /> |
</xsl:copy> |
</xsl:if> |
<xsl:if test="$pronunciation = '2'"> |
<xsl:copy> |
<xsl:apply-templates select="@*|node()" /> |
</xsl:copy> |
</xsl:if> |
</xsl:template> |
<xsl:template match="*[@d:pr='US_IPA']"> |
<xsl:if test="$pronunciation = '1'"> |
<xsl:copy> |
<xsl:apply-templates select="@*|node()" /> |
</xsl:copy> |
</xsl:if> |
</xsl:template> |
<xsl:template match="*[@d:pr='UK_IPA']"> |
<xsl:if test="$pronunciation = '2'"> |
<xsl:copy> |
<xsl:apply-templates select="@*|node()" /> |
</xsl:copy> |
</xsl:if> |
</xsl:template> |
You need to provide an XHTML file that specifies the user interface to present in the Dictionary Preferences window in the Dictionary application. The following example shows how to set up preferences for phonetic notation. The user will see three choices displayed as radio buttons. After making a selection, Dictionary Services saves the it and passes the selection to the XSLT instructions. The instructions are then applied to the dictionary entries.
<html xmlns="http://www.w3.org/1999/xhtml"> |
<head> |
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> |
</head> |
<body> |
<div id="copyright"></div> |
<hr /> |
<div class="query"> |
<input type="hidden" name="version" value="1" /> |
</div> |
<div class="query"> |
Pronunciation:<br /> |
<input type="radio" name="pronunciation" value="0">US English (Diacritical)</input><br /> |
<input type="radio" name="pronunciation" value="1">US English (IPA)</input><br /> |
<input type="radio" name="pronunciation" value="2">British English (IPA)</input><br /> |
</div> |
</body> |
</html> |
You must add keys to the Info.plist
file to indication that the dictionary has its own preferences. The values for this example are shown in the following property list entry. You need to change the values to ones that are appropriate for your dictionary. The values expected for each of the keys are shown in Table 2-2.
<key>DCSDictionaryDefaultPrefs</key> |
<dict> |
<key>pronunciation</key> |
<string>0</string> |
<key>version</key> |
<string>1</string> |
</dict> |
<key>DCSDictionaryPrefsHTML</key> |
<string>MyDictionary_prefs.html</string> |
<key>DCSDictionaryXSL</key> |
<string>MyDictionary.xsl</string> |
Key | Value |
---|---|
|
None. This key specifies that key-value pairs for the default values follow. |
|
The XHTML file name |
|
The XSLT file name |
The Japanese language has multiple character classes—Hiragana, Katakana, and Kanji. Because of this, Japanese words often have multiple representations. Kanji uses ideographic characters; Hiragana and Katakana use phonograms. (Foreign words are often represented using Katakana. Roman characters also are used.) A Kanji word has its Yomi that represents its reading. Hiragana or Katakana usually describe Yomi.
Entries in many Japanese word dictionaries are sorted by Yomi. In such dictionaries, the user enters Yomi to search for words. Using Yomi for Hiragana and Katakana is not an issue because these are phonograms, and there aren’t many of them. But for Kanji, it is an issue because the same Yomi can represent different Kanji. For example the Yomi "かい" represents many words: 会, 界, 貝, 解, 階, 回, 介, ...下位, 甲斐, ...
A user who searches for "かい" gets these results:
かい 【会】
かい 【界】
かい 【貝】
かい 【解】
かい 【階】
かい 【回】
かい 【介】
...
かい 【下位】
かい 【甲斐】
...
The user can choose the appropriate entry using the additional Kanji part.
If the search word is "くふう", the results are:
くふう 【工夫】
くふう 【句風】
Here are search results for “工夫" . The Yomi くふう and こうふ are added to choose appropriate entry.
工夫 【くふう】
工夫 【こうふ】
You need to mark Yomi content in your Japanese dictionary using the d:yomi
attribute. The Dictionary application displays the d:title
and d:yomi
in the appropriate order in the search results list. When the user searches using Hiragana, the Yomi appears before the Kanji. When the user searches using Kanji, the Yomi is added.
For the words in a Japanese dictionary that have multiple representations, the value associated with the d:title
element can be different from the value associated with thed:value
element. To ensure that users can find what they search for, use the d:yomi
attribute with the d:index
element.
In a Japanese dictionary, a Kanji entry has both Kanji and Yomi as its d:value
attribute of the d:index
element. The d:title
markup in its ordinary form is:
<d:entry ... d:title="工夫"> |
<d:index d:value="くふう" d:title="工夫"/> |
<d:index d:value="工夫" d:title="工夫"/> |
... |
</d:entry> |
You can add Yomi using the d:yomi
attribute as shown:
<d:entry ... d:title="工夫"> |
<d:index d:value="くふう" d:title="工夫" d:yomi="くふう"/> |
<d:index d:value="工夫" d:title="工夫" d:yomi="くふう"/> |
... |
</d:entry> |
<d:entry ... d:title="工夫"> |
<d:index d:value="こうふ" d:title="工夫" d:yomi="こうふ"/> |
<d:index d:value="工夫" d:title="工夫" d:yomi="こうふ"/> |
... |
</d:entry> |
The Dictionary application uses d:yomi
and d:title
to add supplementary information either for searching by Yomi or searching by Kanji. You can omit d:title
when it has the same value as d:value
.
The Dictionary Development Kit contains the source for a sample Japanese dictionary (see/Developer/Extras/Dictionary Development Kit/samples/
). The dictionary contains entries for various cases, including the following:
A word that is written using multiple, mixed character classes.
A foreign word that has both Katakana and Roman representations.
속담] Quand on n'a pas de tête, il faut avoir des jambes. (0) | 2011.05.08 |
---|---|
관계대명사 (0) | 2011.05.08 |
[매일매일] 2011년 5월 7일 (0) | 2011.05.07 |
[매일매일] 2011년 5월 6일 (0) | 2011.05.07 |
[매일매일] 2011년 5월 5일 (0) | 2011.05.07 |