tag:blogger.com,1999:blog-43072610084276395182024-03-13T09:03:02.642-07:00My GSoc2011: Hyphenation to AbiwordChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.comBlogger22125tag:blogger.com,1999:blog-4307261008427639518.post-679875788695325812011-08-21T05:13:00.003-07:002011-08-21T05:13:44.099-07:006. How to Support more languages <!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Template>Normal.dotm</o:Template> <o:Revision>0</o:Revision> <o:TotalTime>0</o:TotalTime> <o:Pages>1</o:Pages> <o:Words>47</o:Words> <o:Characters>268</o:Characters> <o:Company>Yahoo</o:Company> <o:Lines>2</o:Lines> <o:Paragraphs>1</o:Paragraphs> <o:CharactersWithSpaces>329</o:CharactersWithSpaces> <o:Version>12.0</o:Version> </o:DocumentProperties> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>0</w:Zoom> <w:TrackMoves>false</w:TrackMoves> <w:TrackFormatting/> <w:PunctuationKerning/> <w:DrawingGridHorizontalSpacing>18 pt</w:DrawingGridHorizontalSpacing> <w:DrawingGridVerticalSpacing>18 pt</w:DrawingGridVerticalSpacing> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>0</w:DisplayVerticalDrawingGridEvery> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables/> <w:DontGrowAutofit/> <w:DontAutofitConstrainedTables/> <w:DontVertAlignInTxbx/> <w:UseFELayout/> </w:Compatibility> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="276"> </w:LatentStyles> </xml><![endif]--> <!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:"Times New Roman";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;
mso-fareast-language:ZH-CN;}
</style> <![endif]--> <!--StartFragment--> <br />
<h2><a href="" name="_Toc301650927"><span class="apple-style-span"><span style="background: white; line-height: 173%; mso-bidi-font-size: 12.0pt;">6. </span></span></a><span><span class="apple-style-span"><span style="background: white; line-height: 173%; mso-bidi-font-size: 10.0pt;">How to </span></span></span><span><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; line-height: 173%; mso-bidi-font-family: Arial;">Support more languages</span></span></span><span style="background: white;"><o:p></o:p></span></h2><div class="MsoNormal"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">As mentioned before, we use Enchant to support more languages. So we have five backend to support more language. Take ISpell and mySpell for example.<o:p></o:p></span></div><div class="MsoNormal"><br />
</div><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-language: ZH-CN; mso-fareast-theme-font: minor-fareast;">In the folder “abiword\msvc2008\Debug\” there are the folder for hyphenation: Spell and mySpell. And there is two folder for their dictionary</span><!--EndFragment--> ChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.com0tag:blogger.com,1999:blog-4307261008427639518.post-43839090380432445192011-08-21T05:13:00.001-07:002011-08-21T05:13:23.878-07:00User interface to manage hyphenation <!--[if !mso]> <style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style> <![endif]--><!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Template>Normal.dotm</o:Template> <o:Revision>0</o:Revision> <o:TotalTime>0</o:TotalTime> <o:Pages>1</o:Pages> <o:Words>53</o:Words> <o:Characters>304</o:Characters> <o:Company>Yahoo</o:Company> <o:Lines>2</o:Lines> <o:Paragraphs>1</o:Paragraphs> <o:CharactersWithSpaces>373</o:CharactersWithSpaces> <o:Version>12.0</o:Version> </o:DocumentProperties> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>0</w:Zoom> <w:TrackMoves>false</w:TrackMoves> <w:TrackFormatting/> <w:PunctuationKerning/> <w:DrawingGridHorizontalSpacing>18 pt</w:DrawingGridHorizontalSpacing> <w:DrawingGridVerticalSpacing>18 pt</w:DrawingGridVerticalSpacing> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>0</w:DisplayVerticalDrawingGridEvery> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables/> <w:DontGrowAutofit/> <w:DontAutofitConstrainedTables/> <w:DontVertAlignInTxbx/> <w:UseFELayout/> </w:Compatibility> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="276"> </w:LatentStyles> </xml><![endif]--> <!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:"Times New Roman";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;
mso-fareast-language:ZH-CN;}
</style> <![endif]--> <!--StartFragment--> <br />
<h2><span class="apple-style-span"><span style="background: white; line-height: 173%; mso-bidi-font-size: 10.0pt;">User interface to manage hyphenation</span></span><span style="background: white;"><o:p></o:p></span></h2><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Doing now, user can enable or disable hyphenation function in user interface (GUI). </span></span><span class="apple-style-span"><b><span style="font-family: Cambria; font-size: 16.0pt; mso-ascii-theme-font: major-latin; mso-bidi-font-family: "Times New Roman"; mso-bidi-theme-font: major-bidi; mso-fareast-font-family: 宋体; mso-fareast-theme-font: major-fareast; mso-hansi-theme-font: major-latin;"><o:p></o:p></span></b></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l0 level1 lfo1; text-indent: -21.0pt;"><!--[if !supportLists]--><span class="apple-style-span"><span style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">I have finished GUI in Windows, Linux, and Cocoa.</span><o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l0 level1 lfo1; text-indent: -21.0pt;"><!--[if !supportLists]--><span class="apple-style-span"><span style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Most languages have been translated for the globalization.</span><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Take Windows GUI for example, user can check the checkbox for enable or disable hyphenation function.</span><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Linux and Cocoa need more tests.</span><o:p></o:p></span></div><div align="center" class="MsoNormal" style="text-align: center;"><span><!--[if gte vml 1]><v:shapetype
id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t"
path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter"/> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0"/> <v:f eqn="sum @0 1 0"/> <v:f eqn="sum 0 0 @1"/> <v:f eqn="prod @2 1 2"/> <v:f eqn="prod @3 21600 pixelWidth"/> <v:f eqn="prod @3 21600 pixelHeight"/> <v:f eqn="sum @0 0 1"/> <v:f eqn="prod @6 1 2"/> <v:f eqn="prod @7 21600 pixelWidth"/> <v:f eqn="sum @8 21600 0"/> <v:f eqn="prod @7 21600 pixelHeight"/> <v:f eqn="sum @10 21600 0"/> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/> <o:lock v:ext="edit" aspectratio="t"/> </v:shapetype><v:shape id="图片_x0020_1" o:spid="_x0000_i1025" type="#_x0000_t75"
alt="C:\Documents and Settings\Administrator\桌面\Simple Checkbox for Hyphenation GUI.bmp"
style='width:302pt;height:316pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file://localhost/Users/xjch/Library/Caches/TemporaryItems/msoclip/0/clip_image001.png"
o:title="Simple Checkbox for Hyphenation GUI.bmp"/> <v:textbox style='mso-rotate-with-shape:t'/> </v:shape><![endif]--><!--[if !vml]--><img alt="C:\Documents and Settings\Administrator\桌面\Simple Checkbox for Hyphenation GUI.bmp" height="318" src="file://localhost/Users/xjch/Library/Caches/TemporaryItems/msoclip/0/clip_image002.png" v:shapes="图片_x0020_1" width="304" /><!--[endif]--></span></div><!--EndFragment-->ChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.com0tag:blogger.com,1999:blog-4307261008427639518.post-74292458249786963072011-08-21T05:12:00.005-07:002011-08-21T05:12:53.196-07:004 Code Re-factor and debug <!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Template>Normal.dotm</o:Template> <o:Revision>0</o:Revision> <o:TotalTime>0</o:TotalTime> <o:Pages>1</o:Pages> <o:Words>23</o:Words> <o:Characters>136</o:Characters> <o:Company>Yahoo</o:Company> <o:Lines>1</o:Lines> <o:Paragraphs>1</o:Paragraphs> <o:CharactersWithSpaces>167</o:CharactersWithSpaces> <o:Version>12.0</o:Version> </o:DocumentProperties> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>0</w:Zoom> <w:TrackMoves>false</w:TrackMoves> <w:TrackFormatting/> <w:PunctuationKerning/> <w:DrawingGridHorizontalSpacing>18 pt</w:DrawingGridHorizontalSpacing> <w:DrawingGridVerticalSpacing>18 pt</w:DrawingGridVerticalSpacing> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>0</w:DisplayVerticalDrawingGridEvery> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables/> <w:DontGrowAutofit/> <w:DontAutofitConstrainedTables/> <w:DontVertAlignInTxbx/> <w:UseFELayout/> </w:Compatibility> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="276"> </w:LatentStyles> </xml><![endif]--> <!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:"Times New Roman";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;
mso-fareast-language:ZH-CN;}
</style> <![endif]--> <!--StartFragment--> <br />
<h2><a href="" name="_Toc301650925"><span class="apple-style-span"><span style="background: white; line-height: 173%; mso-bidi-font-size: 12.0pt;">4 Code Re-factor and debug</span></span></a><span></span><span class="apple-style-span"><span style="font-family: Calibri; font-size: 10.5pt; line-height: 173%;"><o:p></o:p></span></span></h2><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">I have finish the code re-factor both in Enchant and Abiword. Code Re-factor works:</span></span><span class="apple-style-span"><b><span style="font-family: Cambria; font-size: 16.0pt; mso-ascii-theme-font: major-latin; mso-bidi-font-family: "Times New Roman"; mso-bidi-theme-font: major-bidi; mso-fareast-font-family: 宋体; mso-fareast-theme-font: major-fareast; mso-hansi-theme-font: major-latin;"><o:p></o:p></span></b></span></div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">1 deal with some ugly code</span><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">2 deal with the exception</span><o:p></o:p></span></div><!--EndFragment-->ChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.com0tag:blogger.com,1999:blog-4307261008427639518.post-55881925214376419402011-08-21T05:12:00.003-07:002011-08-21T05:12:37.504-07:003 Simple Implementation of Chinese Spell-Check in Enchant <!--[if !mso]> <style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style> <![endif]--><!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Template>Normal.dotm</o:Template> <o:Revision>0</o:Revision> <o:TotalTime>0</o:TotalTime> <o:Pages>1</o:Pages> <o:Words>43</o:Words> <o:Characters>248</o:Characters> <o:Company>Yahoo</o:Company> <o:Lines>2</o:Lines> <o:Paragraphs>1</o:Paragraphs> <o:CharactersWithSpaces>304</o:CharactersWithSpaces> <o:Version>12.0</o:Version> </o:DocumentProperties> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>0</w:Zoom> <w:TrackMoves>false</w:TrackMoves> <w:TrackFormatting/> <w:PunctuationKerning/> <w:DrawingGridHorizontalSpacing>18 pt</w:DrawingGridHorizontalSpacing> <w:DrawingGridVerticalSpacing>18 pt</w:DrawingGridVerticalSpacing> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>0</w:DisplayVerticalDrawingGridEvery> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables/> <w:DontGrowAutofit/> <w:DontAutofitConstrainedTables/> <w:DontVertAlignInTxbx/> <w:UseFELayout/> </w:Compatibility> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="276"> </w:LatentStyles> </xml><![endif]--> <!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:"Times New Roman";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;
mso-fareast-language:ZH-CN;}
</style> <![endif]--> <!--StartFragment--> <br />
<h2><a href="" name="_Toc301650924"><span class="apple-style-span"><span style="background: white; line-height: 173%; mso-bidi-font-size: 12.0pt;">3 Simple Implementation of Chinese Spell-Check in Enchant</span></span></a><span></span><span class="apple-style-span"><span style="font-family: Calibri; font-size: 10.5pt; line-height: 173%;"><o:p></o:p></span></span></h2><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">After GSoc2011, I would like to add Chinese Spell-Check in Enchant. Chinese Spell-Check is also a very important issue in Word-Processor. I found some lib to support; I just build a simple framework since time is limit.</span></span><span class="apple-style-span"><b><span style="font-family: Cambria; font-size: 16.0pt; mso-ascii-theme-font: major-latin; mso-bidi-font-family: "Times New Roman"; mso-bidi-theme-font: major-bidi; mso-fareast-font-family: 宋体; mso-fareast-theme-font: major-fareast; mso-hansi-theme-font: major-latin;"><o:p></o:p></span></b></span></div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">The main function:</span><o:p></o:p></span></div><div class="MsoNormal"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial; mso-fareast-language: EN-US; mso-no-proof: yes;"><!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600"
o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f"
stroked="f"> <v:stroke joinstyle="miter"/> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0"/> <v:f eqn="sum @0 1 0"/> <v:f eqn="sum 0 0 @1"/> <v:f eqn="prod @2 1 2"/> <v:f eqn="prod @3 21600 pixelWidth"/> <v:f eqn="prod @3 21600 pixelHeight"/> <v:f eqn="sum @0 0 1"/> <v:f eqn="prod @6 1 2"/> <v:f eqn="prod @7 21600 pixelWidth"/> <v:f eqn="sum @8 21600 0"/> <v:f eqn="prod @7 21600 pixelHeight"/> <v:f eqn="sum @10 21600 0"/> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/> <o:lock v:ext="edit" aspectratio="t"/> </v:shapetype><v:shape id="图片_x0020_1" o:spid="_x0000_i1025" type="#_x0000_t75"
style='width:415pt;height:139pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file://localhost/Users/xjch/Library/Caches/TemporaryItems/msoclip/0/clip_image001.png"
o:title=""/> <v:textbox style='mso-rotate-with-shape:t'/> </v:shape><![endif]--><!--[if !vml]--><img height="141" src="file://localhost/Users/xjch/Library/Caches/TemporaryItems/msoclip/0/clip_image002.png" v:shapes="图片_x0020_1" width="417" /><!--[endif]--></span><span class="apple-style-span"><o:p></o:p></span></div><div class="MsoNormal"><br />
</div><!--EndFragment-->ChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.com0tag:blogger.com,1999:blog-4307261008427639518.post-56816865555433930372011-08-21T05:12:00.001-07:002011-08-21T05:12:13.641-07:002 Call the Hyphenation function in Abiword. <!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Template>Normal.dotm</o:Template> <o:Revision>0</o:Revision> <o:TotalTime>0</o:TotalTime> <o:Pages>1</o:Pages> <o:Words>389</o:Words> <o:Characters>2221</o:Characters> <o:Company>Yahoo</o:Company> <o:Lines>18</o:Lines> <o:Paragraphs>4</o:Paragraphs> <o:CharactersWithSpaces>2727</o:CharactersWithSpaces> <o:Version>12.0</o:Version> </o:DocumentProperties> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>0</w:Zoom> <w:TrackMoves>false</w:TrackMoves> <w:TrackFormatting/> <w:PunctuationKerning/> <w:DrawingGridHorizontalSpacing>18 pt</w:DrawingGridHorizontalSpacing> <w:DrawingGridVerticalSpacing>18 pt</w:DrawingGridVerticalSpacing> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>0</w:DisplayVerticalDrawingGridEvery> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables/> <w:DontGrowAutofit/> <w:DontAutofitConstrainedTables/> <w:DontVertAlignInTxbx/> <w:UseFELayout/> </w:Compatibility> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="276"> </w:LatentStyles> </xml><![endif]--> <!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:"Times New Roman";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;
mso-fareast-language:ZH-CN;}
</style> <![endif]--> <!--StartFragment--> <br />
<h2><a href="" name="_Toc301650923"><span class="apple-style-span"><span style="background: white; line-height: 173%; mso-bidi-font-size: 12.0pt;">2 Call the H</span></span></a><span><span class="apple-style-span"><span style="background: white; line-height: 173%; mso-bidi-font-size: 10.0pt;">yphenation</span></span></span><span><span class="apple-style-span"><span style="background: white; line-height: 173%; mso-bidi-font-size: 12.0pt;"> function</span></span></span><span><span class="apple-style-span"><span style="background: white; line-height: 173%; mso-bidi-font-size: 10.0pt;"> in Abiword.</span></span></span><span class="apple-style-span"><span style="background: white; line-height: 173%; mso-bidi-font-size: 10.0pt;"> </span></span><span class="apple-style-span"><span style="font-family: Calibri; font-size: 10.5pt; line-height: 173%;"><o:p></o:p></span></span></h2><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l0 level1 lfo1; text-indent: -21.0pt;"><!--[if !supportLists]--><span style="color: black; font-family: Wingdings; font-size: 12.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Split run to split word and keep the format</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l0 level1 lfo1; text-indent: -21.0pt;"><!--[if !supportLists]--><span style="color: black; font-family: Wingdings; font-size: 12.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Find split info</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l0 level1 lfo1; text-indent: -21.0pt;"><!--[if !supportLists]--><span style="color: black; font-family: Wingdings; font-size: 12.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Deal with user's operation(select, delete, cut, paste)</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div align="left" class="MsoNormal" style="text-align: left;"><b><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Main Goal</span></b><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">: <span class="apple-style-span">call hyphenation module of enchant to display the hyphenation result in abiword. After user's operation, refresh the hyphenation-result accordingly include user adding new word, delete word, copy word, cut word</span><o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">The main code is adding in the format function in LineBreaker.h(cpp)<o:p></o:p></span></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">// find the split point<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">while (pRunToBump && pLine->getNumRunsInLine() && (pLine->getLastRun() != m_pLastRunToKeep))<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span>{<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span>UT_ASSERT(pRunToBump->getLine() == pLine);<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span>if(!pLine->removeRun(pRunToBump))<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span>{<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span>pRunToBump->setLine(NULL);<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span>}<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span>UT_ASSERT(pLine->getLastRun()->getType() != FPRUN_ENDOFPARAGRAPH);<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span>if(pLine->getLastRun()->getType() == FPRUN_ENDOFPARAGRAPH)<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span>{<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span>fp_Run * pNuke = pLine->getLastRun();<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span>pLine->removeRun(pNuke);<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span>}<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span>pRunToBump->printText();<span> </span>//trace out debug message & run two time<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span>pNextLine->insertRun(pRunToBump);<span> </span>//called when create new line<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span>// to get the split word<span> </span><span> </span><span> </span><o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span>if (!(pRunToBump->getPrevRun() && pLine->getNumRunsInLine() && (pLine->getLastRun() != m_pLastRunToKeep)))<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span>{<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span>pRunToSplit=pRunToBump;<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span>PD_StruxIterator text(pRunToBump->getBlock()->getStruxDocHandle(),<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span><span> </span>pRunToBump->getBlockOffset() + fl_BLOCK_STRUX_OFFSET);<o:p></o:p></span></b></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span>text.setUpperLimit(text.getPosition() + pRunToBump->getLength() - 1);<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span>UT_ASSERT_HARMLESS( text.getStatus() == UTIter_OK );<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span>UT_UTF8String sTmp;<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span>while(text.getStatus() == UTIter_OK)<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span>{<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span><span> </span>UT_UCS4Char c = text.getChar();<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span><span> </span>UT_DEBUGMSG(("| %d |",c));<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span><span> </span>if(c >= ' ' && c <128)<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span>sTmp +=<span> </span>static_cast<char>(c);<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span><span> </span>++text;<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span>}<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span>UT_DEBUGMSG(("The Split Text |%s| \n",sTmp.utf8_str()));<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span>if(sTmp.utf8_str()!=0) <o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span>{<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>pWordToSplit=sTmp;<span> </span><span> </span><span> </span><span> </span><span> </span><o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span><span> </span>UT_DEBUGMSG(("wordToSplit |%s| \n",pWordToSplit.utf8_str()));<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span>}<span> </span><span> </span><span> </span><span> </span><o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span>}<span> </span><span> </span><span> </span><o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span>pRunToBump = pRunToBump->getPrevRun();<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span>UT_DEBUGMSG(("Next runToBump %x \n",pRunToBump));<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span>}<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>}<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>//modify src/text/fmt/xp/fb_LineBreaker.cpp to place hypernation points<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>//spit the word<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>if(pWordToSplit.length()!=NULL)<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>{<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>pWordHyphenationResult=pBlock->_hyphenateWord(pWordToSplit.ucs4_str().ucs4_str(),0,0);<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span>int tickLeft=pLine->getAvailableWidth();<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span>if (pWordHyphenationResult && *pWordHyphenationResult){<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span>gchar *c = g_ucs4_to_utf8(pWordHyphenationResult, -1, NULL, NULL, NULL);<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span>for(int index=g_utf8_strlen(c,NULL);index>=0;--index)<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span>{<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span>if(pWordHyphenationResult[index]=='-'&&index<tickLeft)<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span>{<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span><span> </span>pBreakPoint=index;<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span><span> </span>fp_TextRun* textout=static_cast<fp_TextRun*>(pRunToSplit);<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span><span> </span>textout->split(pBreakPoint);<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span>}<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span>}<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span>}<o:p></o:p></span></b></div><div class="MsoNormal"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 10.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>}<o:p></o:p></span></b></div><div align="left" class="MsoNormal" style="text-align: left;"><br />
</div><!--EndFragment-->ChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.com0tag:blogger.com,1999:blog-4307261008427639518.post-25666831235617597392011-08-21T05:11:00.003-07:002011-08-21T05:11:48.659-07:001.8 Test in Linux <!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Template>Normal.dotm</o:Template> <o:Revision>0</o:Revision> <o:TotalTime>0</o:TotalTime> <o:Pages>1</o:Pages> <o:Words>9</o:Words> <o:Characters>53</o:Characters> <o:Company>Yahoo</o:Company> <o:Lines>1</o:Lines> <o:Paragraphs>1</o:Paragraphs> <o:CharactersWithSpaces>65</o:CharactersWithSpaces> <o:Version>12.0</o:Version> </o:DocumentProperties> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>0</w:Zoom> <w:TrackMoves>false</w:TrackMoves> <w:TrackFormatting/> <w:PunctuationKerning/> <w:DrawingGridHorizontalSpacing>18 pt</w:DrawingGridHorizontalSpacing> <w:DrawingGridVerticalSpacing>18 pt</w:DrawingGridVerticalSpacing> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>0</w:DisplayVerticalDrawingGridEvery> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables/> <w:DontGrowAutofit/> <w:DontAutofitConstrainedTables/> <w:DontVertAlignInTxbx/> <w:UseFELayout/> </w:Compatibility> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="276"> </w:LatentStyles> </xml><![endif]--> <!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:"Times New Roman";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;
mso-fareast-language:ZH-CN;}
</style> <![endif]--> <!--StartFragment--><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-language: ZH-CN; mso-fareast-theme-font: minor-fareast;">I have test the Enchant module in RedHat.<span> </span>It works fine for me.</span></span><!--EndFragment--> ChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.com0tag:blogger.com,1999:blog-4307261008427639518.post-11603396793615196582011-08-21T05:11:00.001-07:002011-08-21T05:11:28.512-07:001.7 Deploy of enchant in Abiword <!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Template>Normal.dotm</o:Template> <o:Revision>0</o:Revision> <o:TotalTime>0</o:TotalTime> <o:Pages>1</o:Pages> <o:Words>52</o:Words> <o:Characters>297</o:Characters> <o:Company>Yahoo</o:Company> <o:Lines>2</o:Lines> <o:Paragraphs>1</o:Paragraphs> <o:CharactersWithSpaces>364</o:CharactersWithSpaces> <o:Version>12.0</o:Version> </o:DocumentProperties> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>0</w:Zoom> <w:TrackMoves>false</w:TrackMoves> <w:TrackFormatting/> <w:PunctuationKerning/> <w:DrawingGridHorizontalSpacing>18 pt</w:DrawingGridHorizontalSpacing> <w:DrawingGridVerticalSpacing>18 pt</w:DrawingGridVerticalSpacing> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>0</w:DisplayVerticalDrawingGridEvery> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables/> <w:DontGrowAutofit/> <w:DontAutofitConstrainedTables/> <w:DontVertAlignInTxbx/> <w:UseFELayout/> </w:Compatibility> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="276"> </w:LatentStyles> </xml><![endif]--> <!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:"Times New Roman";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;
mso-fareast-language:ZH-CN;}
</style> <![endif]--> <!--StartFragment--> <br />
<div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">I just copy the buliding result of enchant to the right place in Abiword:</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">enchant\bin\Debug\libenchant_myspell.dll ---->abiword\msvc2008\Debug\lib\enchant\libenchant_myspell.dll</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">enchant\bin\Debug\libenchant_ispell.dll ---->abiword\msvc2008\Debug\lib\enchant\libenchant_ispell.dll</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">enchant\bin\Debug\libenchant.dll----></span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">abiword\msvc2008\Debug\bin\ibenchant.dll</span></b><o:p></o:p></span></div><!--EndFragment-->ChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.com0tag:blogger.com,1999:blog-4307261008427639518.post-62903703374481522222011-08-21T05:10:00.002-07:002011-08-21T05:10:51.995-07:001.2 Add five backends to support hyphenation <!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Template>Normal.dotm</o:Template> <o:Revision>0</o:Revision> <o:TotalTime>0</o:TotalTime> <o:Pages>1</o:Pages> <o:Words>640</o:Words> <o:Characters>3653</o:Characters> <o:Company>Yahoo</o:Company> <o:Lines>30</o:Lines> <o:Paragraphs>7</o:Paragraphs> <o:CharactersWithSpaces>4486</o:CharactersWithSpaces> <o:Version>12.0</o:Version> </o:DocumentProperties> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>0</w:Zoom> <w:TrackMoves>false</w:TrackMoves> <w:TrackFormatting/> <w:PunctuationKerning/> <w:DrawingGridHorizontalSpacing>18 pt</w:DrawingGridHorizontalSpacing> <w:DrawingGridVerticalSpacing>18 pt</w:DrawingGridVerticalSpacing> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>0</w:DisplayVerticalDrawingGridEvery> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables/> <w:DontGrowAutofit/> <w:DontAutofitConstrainedTables/> <w:DontVertAlignInTxbx/> <w:UseFELayout/> </w:Compatibility> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="276"> </w:LatentStyles> </xml><![endif]--> <!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:"Times New Roman";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;
mso-fareast-language:ZH-CN;}
</style> <![endif]--> <!--StartFragment--> <br />
<div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">including ispell, myspell, zemberek, voikko, uspell</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l7 level1 lfo5; text-indent: -21.0pt;"><!--[if !supportLists]--><span style="color: black; font-family: Wingdings; font-size: 12.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span class="apple-style-span"><b><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Hunspell: using seperated dictionary: such as hyph_en_us.dic. we can download dic from internet</span></b></span><b><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></b></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l7 level1 lfo5; text-indent: -21.0pt;"><!--[if !supportLists]--><span style="color: black; font-family: Wingdings; font-size: 12.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span class="apple-style-span"><b><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Libhyphenaiton: the dictionary is provided by author, sometimes limited</span></b></span><b><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></b></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l7 level1 lfo5; text-indent: -21.0pt;"><!--[if !supportLists]--><span style="color: black; font-family: Wingdings; font-size: 12.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span class="apple-style-span"><b><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Zemberek: for Turkis</span></b></span><b><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></b></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l7 level1 lfo5; text-indent: -21.0pt;"><!--[if !supportLists]--><span style="color: black; font-family: Wingdings; font-size: 12.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span class="apple-style-span"><b><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Voikko: for Finnish</span></b></span><b><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></b></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">the changes:</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">1 deleted the unneed connection, such as HSpell</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">2 add hunspell(myspell) hyphenation code</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">3 implement hyphenation using hunspell</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">4 implement hyphenation using Zemberek</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">======1 deleted the unneed connection, such as HSpell===========</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Hebrew don’t need any hyphenation</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Yiddish don’t need any hyphenation</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">=======2 Implement hyphenation using hunspell</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">In order to use libhyphenation. We need to add files:</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">hyphen/hnjalloc.h</span></b></span><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><o:p></o:p></span></b></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">hyphen/hnjalloc.c</span></b></span><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><o:p></o:p></span></b></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">hyphen/hyph_en_US.dic</span></b></span><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><o:p></o:p></span></b></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">hyphen/hyphen.c</span></b></span><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><o:p></o:p></span></b></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">hyphen/hyphen.gyp</span></b></span><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><o:p></o:p></span></b></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">hyphen/hyphen.h</span></b></span><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><o:p></o:p></span></b></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">hyphen/hyphen.patch</span></b></span><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><o:p></o:p></span></b></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">hyphen/hyphen.tex</span></b></span><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><o:p></o:p></span></b></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">========3 Implement hyphenation using Zemberek</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"> just using dbus_g_proxy_call the same as Spell-Check in Zemberek:</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoNormal"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">the hyphenation is as following<o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"> char* Zemberek::hyphenate(const char* word)</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">{</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"> char* result;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"> GError *Error = NULL;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"> if (!dbus_g_proxy_call (proxy, "hecele", &Error,</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"> G_TYPE_STRING,word,G_TYPE_INVALID,</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"> G_TYPE_STRV, &result,G_TYPE_INVALID)) {</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"> g_error_free (Error);</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"> return NULL;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"> }</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"> char*result=0;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"> return result;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">}</span></b><o:p></o:p></span></div><div class="MsoNormal"><br />
</div><h3><a href="" name="_Toc301650917"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; line-height: 173%; mso-bidi-font-family: Arial;">1.3 ISpell</span></span></a><span style="background: white;"><o:p></o:p></span></h3><div class="MsoNormal"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">I used Libhyphenation in ISpell. The simple code is just like this:<o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">static char *</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">ispell_dict_hyphenate (EnchantDict * me, const char *const word)</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">{</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>ISpellChecker * checker;</span></b><o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>checker = (ISpellChecker *) me->user_data;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>if(me->tag!="")</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span>return checker->hyphenate (word,me->tag);</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>return checker->hyphenate (word,"en_us");</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">}</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">The concrete code in ISpellChecker is :</span></b><o:p></o:p></span></div><div align="left" class="MsoNormal" style="mso-layout-grid-align: none; text-align: left; text-autospace: none;"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">char *</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">ISpellChecker::hyphenate(const char * const utf8Word, const char *const tag)</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">{<span> </span>//we must choose the right language tag</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>char* param_value = enchant_broker_get_param (m_broker, "enchant.ispell.hyphenation.dictionary.path");</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>if(languageMap[tag]!="")</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>{</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span>string result=Hyphenator(RFC_3066::Language(languageMap[tag]),param_value).hyphenate(utf8Word).c_str();</span></b><o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span>char* temp=new char[result.length()];</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span>strcpy(temp,result.c_str());</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span>return temp;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>}</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>return NULL;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">}</span></b><o:p></o:p></span></div><h3><a href="" name="_Toc301650918"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; line-height: 173%; mso-bidi-font-family: Arial;">1.4 MySpell</span></span></a><span style="background: white;"><o:p></o:p></span></h3><div class="MsoNormal"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">I used Libhyphenate in ISpell. The simple code is just like this:<o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">char*</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">MySpellChecker::hyphenate (const char* const word, size_t len,char* tag)</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">{</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>if(len==-1) len=strlen(word);</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>if (len > MAXWORDLEN </span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span>|| !g_iconv_is_valid(m_translate_in)</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span>|| !g_iconv_is_valid(m_translate_out))</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span>return 0;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>char* result=0;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>myspell->hyphenate(word,result,tag);</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>return result;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">}</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">The concrete code in MySpellChecker is :</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">void Hunspell::hyphenate( const char* const word, char* result, char* tag )</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">{</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>HyphenDict *dict;<span> </span></span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>char buf[BUFSIZE + 1];<span> </span></span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>char *hyphens=new char[BUFSIZE + 1];<span> </span></span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>char ** rep;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>int * pos;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>int * cut;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>/* load the hyphenation dictionary */<span> </span></span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>string filePath="hyph_";</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>filePath+=tag;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>filePath+=".dic";</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>if ((dict = hnj_hyphen_load(filePath.c_str())) == NULL) {</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span>fprintf(stderr, "Couldn't find file %s\n",tag);</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span>fflush(stderr);</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span>exit(1);</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>}</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>int len=strlen(word);</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>if (hnj_hyphen_hyphenate2(dict, word, len-1, hyphens, NULL, &rep, &pos, &cut)) {</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span>free(hyphens);</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span>fprintf(stderr, "hyphenation error\n");</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span><span> </span><span> </span>exit(1);</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span><span> </span>}</span></b><o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>hnj_hyphen_free(dict);</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><span> </span>result=hyphens;<span> </span></span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; font-size: 11.0pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">}</span></b><o:p></o:p></span></div><div class="MsoNormal"><br />
</div><h3><a href="" name="_Toc301650919"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; line-height: 173%; mso-bidi-font-family: Arial;">1.5 zemberek</span></span></a><span style="background: white;"><o:p></o:p></span></h3><div class="MsoNormal"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">The way in Zemberek is same with the two above:<o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;">static char*</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;">zemberek_dict_hyphenate (EnchantDict * me, const char *const word)</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;">{</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;"><span> </span>Zemberek *checker;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;"><span> </span>checker = (Zemberek *) me->user_data;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;"><span> </span>return checker->hyphenate (word);</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;">}</span></b><o:p></o:p></span></div><div class="MsoNormal"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">But the way for the concrete implementation is different from the two. We use </span><b><span style="color: #020002; font-family: Arial; font-size: 14.0pt; mso-bidi-font-family: Arial; mso-fareast-font-family: Fixedsys; mso-font-kerning: 0pt; mso-no-proof: yes;">zemberek_service<o:p></o:p></span></b></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;">char* Zemberek::hyphenate(const char* word)</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;">{</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;"><span> </span>char* result;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;"><span> </span>GError *Error = NULL;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;"><span> </span>if (!dbus_g_proxy_call (proxy, "hecele", &Error,</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;"><span> </span><span> </span>G_TYPE_STRING,word,G_TYPE_INVALID,</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;"><span> </span><span> </span>G_TYPE_STRV, &result,G_TYPE_INVALID)) {</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;"><span> </span><span> </span><span> </span>g_error_free (Error);</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;"><span> </span><span> </span><span> </span>return NULL;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;"><span> </span>}</span></b><o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;"><span> </span>char*result=0;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;"><span> </span>return result;<span> </span></span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;">}</span></b><o:p></o:p></span></div><h3><a href="" name="_Toc301650920"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; line-height: 173%; mso-bidi-font-family: Arial;">1.6 voikko</span></span></a><span style="background: white;"><o:p></o:p></span></h3><div class="MsoNormal"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">The hyphenation implementation in Voikko is easy since Voikko has hyphenaiton’s API.<o:p></o:p></span></div><div align="left" class="MsoNormal" style="mso-layout-grid-align: none; text-align: left; text-autospace: none;"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;">static char **</span></b><o:p></o:p></span></div><div align="left" class="MsoNormal" style="mso-layout-grid-align: none; text-align: left; text-autospace: none;"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;">voikko_dict_suggest (EnchantDict * me, const char *const word,</span></b><o:p></o:p></span></div><div align="left" class="MsoNormal" style="mso-layout-grid-align: none; text-align: left; text-autospace: none;"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;"><span> </span><span> </span><span> </span>size_t len, size_t * out_n_suggs)</span></b><o:p></o:p></span></div><div align="left" class="MsoNormal" style="mso-layout-grid-align: none; text-align: left; text-autospace: none;"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;">{</span></b><o:p></o:p></span></div><div align="left" class="MsoNormal" style="mso-layout-grid-align: none; text-align: left; text-autospace: none;"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;"><span> </span>char **sugg_arr;</span></b><o:p></o:p></span></div><div align="left" class="MsoNormal" style="mso-layout-grid-align: none; text-align: left; text-autospace: none;"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;"><span> </span>int voikko_handle;</span></b><o:p></o:p></span></div><div align="left" class="MsoNormal" style="mso-layout-grid-align: none; text-align: left; text-autospace: none;"><br />
</div><div align="left" class="MsoNormal" style="mso-layout-grid-align: none; text-align: left; text-autospace: none;"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;"><span> </span>voikko_handle = (long) me->user_data;</span></b><o:p></o:p></span></div><div align="left" class="MsoNormal" style="mso-layout-grid-align: none; text-align: left; text-autospace: none;"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;"><span> </span>sugg_arr =</span></b></span><span class="apple-style-span"><b><span style="color: red; font-size: 14.0pt;"> voikko_suggest_cstr</span></b></span><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;">(voikko_handle, word);</span></b><o:p></o:p></span></div><div align="left" class="MsoNormal" style="mso-layout-grid-align: none; text-align: left; text-autospace: none;"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;"><span> </span>if (sugg_arr == NULL)</span></b><o:p></o:p></span></div><div align="left" class="MsoNormal" style="mso-layout-grid-align: none; text-align: left; text-autospace: none;"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;"><span> </span><span> </span>return NULL;</span></b><o:p></o:p></span></div><div align="left" class="MsoNormal" style="mso-layout-grid-align: none; text-align: left; text-autospace: none;"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;"><span> </span>for (*out_n_suggs = 0; sugg_arr[*out_n_suggs] != NULL; (*out_n_suggs)++);</span></b><o:p></o:p></span></div><div align="left" class="MsoNormal" style="mso-layout-grid-align: none; text-align: left; text-autospace: none;"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;"><span> </span>return sugg_arr;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="color: #00b050; font-size: 11.0pt;">}</span></b><o:p></o:p></span></div><div class="MsoNormal"><br />
</div><!--EndFragment-->ChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.com0tag:blogger.com,1999:blog-4307261008427639518.post-51194851473785352542011-08-21T05:10:00.000-07:002011-08-21T05:10:09.874-07:001. Hyphenation module in Enchant <!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Template>Normal.dotm</o:Template> <o:Revision>0</o:Revision> <o:TotalTime>0</o:TotalTime> <o:Pages>1</o:Pages> <o:Words>191</o:Words> <o:Characters>1094</o:Characters> <o:Company>Yahoo</o:Company> <o:Lines>9</o:Lines> <o:Paragraphs>2</o:Paragraphs> <o:CharactersWithSpaces>1343</o:CharactersWithSpaces> <o:Version>12.0</o:Version> </o:DocumentProperties> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>0</w:Zoom> <w:TrackMoves>false</w:TrackMoves> <w:TrackFormatting/> <w:PunctuationKerning/> <w:DrawingGridHorizontalSpacing>18 pt</w:DrawingGridHorizontalSpacing> <w:DrawingGridVerticalSpacing>18 pt</w:DrawingGridVerticalSpacing> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>0</w:DisplayVerticalDrawingGridEvery> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables/> <w:DontGrowAutofit/> <w:DontAutofitConstrainedTables/> <w:DontVertAlignInTxbx/> <w:UseFELayout/> </w:Compatibility> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="276"> </w:LatentStyles> </xml><![endif]--> <!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:"Times New Roman";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;
mso-fareast-language:ZH-CN;}
</style> <![endif]--> <!--StartFragment--> <br />
<h3><a href="" name="_Toc301650915"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; line-height: 173%; mso-bidi-font-family: Arial;">1.1 Add hyphenation function in Enchant</span></span></a><span style="background: white;"><o:p></o:p></span></h3><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Firstly, I add hyphenation method in Enchant:</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">================the code===========</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">I think we can combine the hyphenation with spell-checking together, So that we can make the code more flexible. In my opinion, the hyphenation function defines as following:</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">EnchantDict* enchant_broker_request_dict (EnchantBroker* broker, const</span></b></span><b><span style="background: white; color: #00b050; font-family: Arial; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><o:p></o:p></span></b></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">char *const lang); //same as spell-checking</span></b></span><b><span style="background: white; color: #00b050; font-family: Arial; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><o:p></o:p></span></b></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">char *enchant_dict_hyphenate(EnchantDict *dict, const char *const word,size_t len);</span></b></span><span style="background: white; color: black; font-family: Arial; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"><o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">In order to achieve the function and implement in abstract layer, we need to add hyphenation function in EnchantDict. something like, just as a function pointer:</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">char* (*hyphenate) (struct str_enchant_dict * me,</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"> const char *const word, size_t len,</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"> size_t * out_n_suggs);</span></b><o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">and the function is implement by the backend. Take “ispell” as example: </span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">static char * ispell_dict_hyphenate (EnchantDict * me, const char *const word,</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"> size_t len, size_t * out_n_suggs)</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">{</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"> ISpellChecker * checker;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"> checker = (ISpellChecker *) me->user_data;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"> return checker->hyphenate (word, len, out_n_suggs);</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">}</span></b><o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Finally, we set the connetion</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"> </span></span><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">dict->hyphenate = ispell_dict_hyphenate;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;"> dict->suggest = hspell_dict_hyphenate;</span></b><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: #00b050; font-family: Arial; mso-bidi-font-family: Arial; mso-bidi-font-size: 12.0pt;">dict->suggest = zemberek_dict_hyphenate;</span></b><o:p></o:p></span></div><!--EndFragment-->ChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.com0tag:blogger.com,1999:blog-4307261008427639518.post-17113030083922164402011-08-21T05:09:00.001-07:002011-08-21T05:09:17.442-07:00Summary of What I have done in GSoc2011 <!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Template>Normal.dotm</o:Template> <o:Revision>0</o:Revision> <o:TotalTime>0</o:TotalTime> <o:Pages>1</o:Pages> <o:Words>427</o:Words> <o:Characters>2439</o:Characters> <o:Company>Yahoo</o:Company> <o:Lines>20</o:Lines> <o:Paragraphs>4</o:Paragraphs> <o:CharactersWithSpaces>2995</o:CharactersWithSpaces> <o:Version>12.0</o:Version> </o:DocumentProperties> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>0</w:Zoom> <w:TrackMoves>false</w:TrackMoves> <w:TrackFormatting/> <w:PunctuationKerning/> <w:DrawingGridHorizontalSpacing>18 pt</w:DrawingGridHorizontalSpacing> <w:DrawingGridVerticalSpacing>18 pt</w:DrawingGridVerticalSpacing> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>0</w:DisplayVerticalDrawingGridEvery> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables/> <w:DontGrowAutofit/> <w:DontAutofitConstrainedTables/> <w:DontVertAlignInTxbx/> <w:UseFELayout/> </w:Compatibility> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="276"> </w:LatentStyles> </xml><![endif]--> <!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:"Times New Roman";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;
mso-fareast-language:ZH-CN;}
</style> <![endif]--> <!--StartFragment--> <br />
<div class="MsoToc1"><!--[if supportFields]><span
style='font-size:14.0pt;font-family:Arial;mso-bidi-font-family:Arial'><span
style='mso-element:field-begin'></span><span style="mso-spacerun:
yes"> </span>TOC \o "1-3" \h \z \u <span style='mso-element:
field-separator'></span></span><![endif]--><span><span class="MsoHyperlink"><span style="background: white; font-size: 14.0pt; mso-no-proof: yes;">Summary of What I have done in GSoc2011</span></span><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;"><span>. </span></span><!--[if supportFields]><span
style='font-size:14.0pt;display:none;mso-hide:screen;mso-no-proof:yes'><span
style='mso-element:field-begin'></span> PAGEREF _Toc301650913 \h </span><span
style='font-size:14.0pt;mso-no-proof:yes'><span style='display:none;mso-hide:
screen'><span style='mso-element:field-separator'></span></span></span><![endif]--><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;">1<!--[if gte mso 9]><xml> <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003300300031003600350030003900310033000000</w:data> </xml><![endif]--></span><!--[if supportFields]><span style='font-size:14.0pt;
display:none;mso-hide:screen;mso-no-proof:yes'><span style='mso-element:field-end'></span></span><![endif]--></span><span style="font-size: 14.0pt; mso-no-proof: yes;"><o:p></o:p></span></div><div class="MsoToc2"><span><span class="MsoHyperlink"><span style="background: white; font-family: Arial; font-size: 14.0pt; mso-bidi-font-family: Arial; mso-no-proof: yes;">1 Hyphenation module in Enchant</span></span><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;"><span> </span></span><!--[if supportFields]><span
style='font-size:14.0pt;display:none;mso-hide:screen;mso-no-proof:yes'><span
style='mso-element:field-begin'></span> PAGEREF _Toc301650914 \h </span><span
style='font-size:14.0pt;mso-no-proof:yes'><span style='display:none;mso-hide:
screen'><span style='mso-element:field-separator'></span></span></span><![endif]--><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;">3<!--[if gte mso 9]><xml> <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003300300031003600350030003900310034000000</w:data> </xml><![endif]--></span><!--[if supportFields]><span style='font-size:14.0pt;
display:none;mso-hide:screen;mso-no-proof:yes'><span style='mso-element:field-end'></span></span><![endif]--></span><span style="font-size: 14.0pt; mso-no-proof: yes;"><o:p></o:p></span></div><div class="MsoToc3"><span><span class="MsoHyperlink"><span style="background: white; font-family: Arial; font-size: 14.0pt; mso-bidi-font-family: Arial; mso-no-proof: yes;">1.1 Add hyphenation function in Enchant</span></span><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;"><span> </span></span><!--[if supportFields]><span
style='font-size:14.0pt;display:none;mso-hide:screen;mso-no-proof:yes'><span
style='mso-element:field-begin'></span> PAGEREF _Toc301650915 \h </span><span
style='font-size:14.0pt;mso-no-proof:yes'><span style='display:none;mso-hide:
screen'><span style='mso-element:field-separator'></span></span></span><![endif]--><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;">3<!--[if gte mso 9]><xml> <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003300300031003600350030003900310035000000</w:data> </xml><![endif]--></span><!--[if supportFields]><span style='font-size:14.0pt;
display:none;mso-hide:screen;mso-no-proof:yes'><span style='mso-element:field-end'></span></span><![endif]--></span><span style="font-size: 14.0pt; mso-no-proof: yes;"><o:p></o:p></span></div><div class="MsoToc3"><span><span class="MsoHyperlink"><span style="background: white; font-family: Arial; font-size: 14.0pt; mso-bidi-font-family: Arial; mso-no-proof: yes;">1.2 Add five backends to support hyphenation</span></span><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;"><span>. </span></span><!--[if supportFields]><span
style='font-size:14.0pt;display:none;mso-hide:screen;mso-no-proof:yes'><span
style='mso-element:field-begin'></span> PAGEREF _Toc301650916 \h </span><span
style='font-size:14.0pt;mso-no-proof:yes'><span style='display:none;mso-hide:
screen'><span style='mso-element:field-separator'></span></span></span><![endif]--><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;">3<!--[if gte mso 9]><xml> <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003300300031003600350030003900310036000000</w:data> </xml><![endif]--></span><!--[if supportFields]><span style='font-size:14.0pt;
display:none;mso-hide:screen;mso-no-proof:yes'><span style='mso-element:field-end'></span></span><![endif]--></span><span style="font-size: 14.0pt; mso-no-proof: yes;"><o:p></o:p></span></div><div class="MsoToc3"><span><span class="MsoHyperlink"><span style="background: white; font-family: Arial; font-size: 14.0pt; mso-bidi-font-family: Arial; mso-no-proof: yes;">1.3 ISpell</span></span><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;"><span> </span></span><!--[if supportFields]><span
style='font-size:14.0pt;display:none;mso-hide:screen;mso-no-proof:yes'><span
style='mso-element:field-begin'></span> PAGEREF _Toc301650917 \h </span><span
style='font-size:14.0pt;mso-no-proof:yes'><span style='display:none;mso-hide:
screen'><span style='mso-element:field-separator'></span></span></span><![endif]--><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;">5<!--[if gte mso 9]><xml> <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003300300031003600350030003900310037000000</w:data> </xml><![endif]--></span><!--[if supportFields]><span style='font-size:14.0pt;
display:none;mso-hide:screen;mso-no-proof:yes'><span style='mso-element:field-end'></span></span><![endif]--></span><span style="font-size: 14.0pt; mso-no-proof: yes;"><o:p></o:p></span></div><div class="MsoToc3"><span><span class="MsoHyperlink"><span style="background: white; font-family: Arial; font-size: 14.0pt; mso-bidi-font-family: Arial; mso-no-proof: yes;">1.4 MySpell</span></span><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;"><span> </span></span><!--[if supportFields]><span
style='font-size:14.0pt;display:none;mso-hide:screen;mso-no-proof:yes'><span
style='mso-element:field-begin'></span> PAGEREF _Toc301650918 \h </span><span
style='font-size:14.0pt;mso-no-proof:yes'><span style='display:none;mso-hide:
screen'><span style='mso-element:field-separator'></span></span></span><![endif]--><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;">5<!--[if gte mso 9]><xml> <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003300300031003600350030003900310038000000</w:data> </xml><![endif]--></span><!--[if supportFields]><span style='font-size:14.0pt;
display:none;mso-hide:screen;mso-no-proof:yes'><span style='mso-element:field-end'></span></span><![endif]--></span><span style="font-size: 14.0pt; mso-no-proof: yes;"><o:p></o:p></span></div><div class="MsoToc3"><span><span class="MsoHyperlink"><span style="background: white; font-family: Arial; font-size: 14.0pt; mso-bidi-font-family: Arial; mso-no-proof: yes;">1.5 zemberek</span></span><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;"><span>. </span></span><!--[if supportFields]><span
style='font-size:14.0pt;display:none;mso-hide:screen;mso-no-proof:yes'><span
style='mso-element:field-begin'></span> PAGEREF _Toc301650919 \h </span><span
style='font-size:14.0pt;mso-no-proof:yes'><span style='display:none;mso-hide:
screen'><span style='mso-element:field-separator'></span></span></span><![endif]--><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;">6<!--[if gte mso 9]><xml> <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003300300031003600350030003900310039000000</w:data> </xml><![endif]--></span><!--[if supportFields]><span style='font-size:14.0pt;
display:none;mso-hide:screen;mso-no-proof:yes'><span style='mso-element:field-end'></span></span><![endif]--></span><span style="font-size: 14.0pt; mso-no-proof: yes;"><o:p></o:p></span></div><div class="MsoToc3"><span><span class="MsoHyperlink"><span style="background: white; font-family: Arial; font-size: 14.0pt; mso-bidi-font-family: Arial; mso-no-proof: yes;">1.6 voikko</span></span><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;"><span>. </span></span><!--[if supportFields]><span
style='font-size:14.0pt;display:none;mso-hide:screen;mso-no-proof:yes'><span
style='mso-element:field-begin'></span> PAGEREF _Toc301650920 \h </span><span
style='font-size:14.0pt;mso-no-proof:yes'><span style='display:none;mso-hide:
screen'><span style='mso-element:field-separator'></span></span></span><![endif]--><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;">7<!--[if gte mso 9]><xml> <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003300300031003600350030003900320030000000</w:data> </xml><![endif]--></span><!--[if supportFields]><span style='font-size:14.0pt;
display:none;mso-hide:screen;mso-no-proof:yes'><span style='mso-element:field-end'></span></span><![endif]--></span><span style="font-size: 14.0pt; mso-no-proof: yes;"><o:p></o:p></span></div><div class="MsoToc3"><span><span class="MsoHyperlink"><span style="background: white; font-family: Arial; font-size: 14.0pt; mso-bidi-font-family: Arial; mso-no-proof: yes;">1.7 Deploy of enchant in Abiword</span></span><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;"><span>. </span></span><!--[if supportFields]><span
style='font-size:14.0pt;display:none;mso-hide:screen;mso-no-proof:yes'><span
style='mso-element:field-begin'></span> PAGEREF _Toc301650921 \h </span><span
style='font-size:14.0pt;mso-no-proof:yes'><span style='display:none;mso-hide:
screen'><span style='mso-element:field-separator'></span></span></span><![endif]--><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;">7<!--[if gte mso 9]><xml> <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003300300031003600350030003900320031000000</w:data> </xml><![endif]--></span><!--[if supportFields]><span style='font-size:14.0pt;
display:none;mso-hide:screen;mso-no-proof:yes'><span style='mso-element:field-end'></span></span><![endif]--></span><span style="font-size: 14.0pt; mso-no-proof: yes;"><o:p></o:p></span></div><div class="MsoToc3"><span><span class="MsoHyperlink"><span style="background: white; font-size: 14.0pt; mso-no-proof: yes;">1.8 Test in Linux</span></span><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;"><span>. </span></span><!--[if supportFields]><span
style='font-size:14.0pt;display:none;mso-hide:screen;mso-no-proof:yes'><span
style='mso-element:field-begin'></span> PAGEREF _Toc301650922 \h </span><span
style='font-size:14.0pt;mso-no-proof:yes'><span style='display:none;mso-hide:
screen'><span style='mso-element:field-separator'></span></span></span><![endif]--><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;">8<!--[if gte mso 9]><xml> <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003300300031003600350030003900320032000000</w:data> </xml><![endif]--></span><!--[if supportFields]><span style='font-size:14.0pt;
display:none;mso-hide:screen;mso-no-proof:yes'><span style='mso-element:field-end'></span></span><![endif]--></span><span style="font-size: 14.0pt; mso-no-proof: yes;"><o:p></o:p></span></div><div class="MsoToc2"><span><span class="MsoHyperlink"><span style="background: white; font-size: 14.0pt; mso-no-proof: yes;">2 Call the Hyphenation function in Abiword.</span></span><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;"><span> </span></span><!--[if supportFields]><span
style='font-size:14.0pt;display:none;mso-hide:screen;mso-no-proof:yes'><span
style='mso-element:field-begin'></span> PAGEREF _Toc301650923 \h </span><span
style='font-size:14.0pt;mso-no-proof:yes'><span style='display:none;mso-hide:
screen'><span style='mso-element:field-separator'></span></span></span><![endif]--><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;">8<!--[if gte mso 9]><xml> <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003300300031003600350030003900320033000000</w:data> </xml><![endif]--></span><!--[if supportFields]><span style='font-size:14.0pt;
display:none;mso-hide:screen;mso-no-proof:yes'><span style='mso-element:field-end'></span></span><![endif]--></span><span style="font-size: 14.0pt; mso-no-proof: yes;"><o:p></o:p></span></div><div class="MsoToc2"><span><span class="MsoHyperlink"><span style="background: white; font-size: 14.0pt; mso-no-proof: yes;">3 Simple Implementation of Chinese Spell-Check in Enchant</span></span><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;"><span>. </span></span><!--[if supportFields]><span
style='font-size:14.0pt;display:none;mso-hide:screen;mso-no-proof:yes'><span
style='mso-element:field-begin'></span> PAGEREF _Toc301650924 \h </span><span
style='font-size:14.0pt;mso-no-proof:yes'><span style='display:none;mso-hide:
screen'><span style='mso-element:field-separator'></span></span></span><![endif]--><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;">10<!--[if gte mso 9]><xml> <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003300300031003600350030003900320034000000</w:data> </xml><![endif]--></span><!--[if supportFields]><span style='font-size:14.0pt;
display:none;mso-hide:screen;mso-no-proof:yes'><span style='mso-element:field-end'></span></span><![endif]--></span><span style="font-size: 14.0pt; mso-no-proof: yes;"><o:p></o:p></span></div><div class="MsoToc2"><span><span class="MsoHyperlink"><span style="background: white; font-size: 14.0pt; mso-no-proof: yes;">4 Code Re-factor and debug</span></span><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;"><span>. </span></span><!--[if supportFields]><span
style='font-size:14.0pt;display:none;mso-hide:screen;mso-no-proof:yes'><span
style='mso-element:field-begin'></span> PAGEREF _Toc301650925 \h </span><span
style='font-size:14.0pt;mso-no-proof:yes'><span style='display:none;mso-hide:
screen'><span style='mso-element:field-separator'></span></span></span><![endif]--><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;">10<!--[if gte mso 9]><xml> <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003300300031003600350030003900320035000000</w:data> </xml><![endif]--></span><!--[if supportFields]><span style='font-size:14.0pt;
display:none;mso-hide:screen;mso-no-proof:yes'><span style='mso-element:field-end'></span></span><![endif]--></span><span style="font-size: 14.0pt; mso-no-proof: yes;"><o:p></o:p></span></div><div class="MsoToc2"><span><span class="MsoHyperlink"><span style="background: white; font-size: 14.0pt; mso-no-proof: yes;">5. User interface to manage hyphenation</span></span><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;"><span>. </span></span><!--[if supportFields]><span
style='font-size:14.0pt;display:none;mso-hide:screen;mso-no-proof:yes'><span
style='mso-element:field-begin'></span> PAGEREF _Toc301650926 \h </span><span
style='font-size:14.0pt;mso-no-proof:yes'><span style='display:none;mso-hide:
screen'><span style='mso-element:field-separator'></span></span></span><![endif]--><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;">10<!--[if gte mso 9]><xml> <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003300300031003600350030003900320036000000</w:data> </xml><![endif]--></span><!--[if supportFields]><span style='font-size:14.0pt;
display:none;mso-hide:screen;mso-no-proof:yes'><span style='mso-element:field-end'></span></span><![endif]--></span><span style="font-size: 14.0pt; mso-no-proof: yes;"><o:p></o:p></span></div><div class="MsoToc2"><span><span class="MsoHyperlink"><span style="background: white; font-size: 14.0pt; mso-no-proof: yes;">6. How to </span></span><span class="MsoHyperlink"><span style="background: white; font-family: Arial; font-size: 14.0pt; mso-bidi-font-family: Arial; mso-no-proof: yes;">Support more languages</span></span><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;"><span>. </span></span><!--[if supportFields]><span
style='font-size:14.0pt;display:none;mso-hide:screen;mso-no-proof:yes'><span
style='mso-element:field-begin'></span> PAGEREF _Toc301650927 \h </span><span
style='font-size:14.0pt;mso-no-proof:yes'><span style='display:none;mso-hide:
screen'><span style='mso-element:field-separator'></span></span></span><![endif]--><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;">11<!--[if gte mso 9]><xml> <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003300300031003600350030003900320037000000</w:data> </xml><![endif]--></span><!--[if supportFields]><span style='font-size:14.0pt;
display:none;mso-hide:screen;mso-no-proof:yes'><span style='mso-element:field-end'></span></span><![endif]--></span><span style="font-size: 14.0pt; mso-no-proof: yes;"><o:p></o:p></span></div><div class="MsoToc3"><span><span class="MsoHyperlink"><span style="background: white; font-size: 14.0pt; mso-no-proof: yes;">6.1 How to support more languages in ISpell</span></span><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;"><span> </span></span><!--[if supportFields]><span
style='font-size:14.0pt;display:none;mso-hide:screen;mso-no-proof:yes'><span
style='mso-element:field-begin'></span> PAGEREF _Toc301650928 \h </span><span
style='font-size:14.0pt;mso-no-proof:yes'><span style='display:none;mso-hide:
screen'><span style='mso-element:field-separator'></span></span></span><![endif]--><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;">12<!--[if gte mso 9]><xml> <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003300300031003600350030003900320038000000</w:data> </xml><![endif]--></span><!--[if supportFields]><span style='font-size:14.0pt;
display:none;mso-hide:screen;mso-no-proof:yes'><span style='mso-element:field-end'></span></span><![endif]--></span><span style="font-size: 14.0pt; mso-no-proof: yes;"><o:p></o:p></span></div><div class="MsoToc3"><span><span class="MsoHyperlink"><span style="background: white; font-size: 14.0pt; mso-no-proof: yes;">6.2 How to support more languages in mySepll</span></span><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;"><span> </span></span><!--[if supportFields]><span
style='font-size:14.0pt;display:none;mso-hide:screen;mso-no-proof:yes'><span
style='mso-element:field-begin'></span> PAGEREF _Toc301650929 \h </span><span
style='font-size:14.0pt;mso-no-proof:yes'><span style='display:none;mso-hide:
screen'><span style='mso-element:field-separator'></span></span></span><![endif]--><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;">13<!--[if gte mso 9]><xml> <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003300300031003600350030003900320039000000</w:data> </xml><![endif]--></span><!--[if supportFields]><span style='font-size:14.0pt;
display:none;mso-hide:screen;mso-no-proof:yes'><span style='mso-element:field-end'></span></span><![endif]--></span><span style="font-size: 14.0pt; mso-no-proof: yes;"><o:p></o:p></span></div><div class="MsoToc2"><span><span class="MsoHyperlink"><span style="background: white; font-size: 14.0pt; mso-no-proof: yes;">7. How to extend the enchant function</span></span><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;"><span>. </span></span><!--[if supportFields]><span
style='font-size:14.0pt;display:none;mso-hide:screen;mso-no-proof:yes'><span
style='mso-element:field-begin'></span> PAGEREF _Toc301650930 \h </span><span
style='font-size:14.0pt;mso-no-proof:yes'><span style='display:none;mso-hide:
screen'><span style='mso-element:field-separator'></span></span></span><![endif]--><span style="display: none; font-size: 14.0pt; mso-hide: screen; mso-no-proof: yes;">13<!--[if gte mso 9]><xml> <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003300300031003600350030003900330030000000</w:data> </xml><![endif]--></span><!--[if supportFields]><span style='font-size:14.0pt;
display:none;mso-hide:screen;mso-no-proof:yes'><span style='mso-element:field-end'></span></span><![endif]--></span><span style="font-size: 14.0pt; mso-no-proof: yes;"><o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Until now, my works in GSoc2011 including four parts as following:</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">1</span></b></span><span lang="ZH-CN" style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">.</span><span class="apple-style-span"><b><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Hyphenation module in Enchant</span></b></span><b><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></b></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l10 level1 lfo1; text-indent: -21.0pt;"><!--[if !supportLists]--><span class="apple-style-span"><span style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Read and get totally understand the source code of Enchant</span><o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l10 level1 lfo1; text-indent: -21.0pt;"><!--[if !supportLists]--><span style="color: black; font-family: Wingdings; font-size: 12.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Reuse the abstract layer of Enchant and add Hyphenation function in Enchant</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">, so that <span class="apple-style-span">we can add more language easily</span><o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l10 level1 lfo1; text-indent: -21.0pt;"><!--[if !supportLists]--><span class="apple-style-span"><span style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Deal with more languages</span><o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l10 level1 lfo1; text-indent: -21.0pt;"><!--[if !supportLists]--><span class="apple-style-span"><span style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Add five backend implementation, including ispell, myspell, zemberek, voikko, uspell</span><o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l10 level1 lfo1; text-indent: -21.0pt;"><!--[if !supportLists]--><span class="apple-style-span"><span style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Deal with the spelling-checking module</span><o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; text-indent: 0in;"><br />
</div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">2</span></b></span><span class="apple-style-span"><b><span lang="ZH-CN" style="background: white; color: black; font-family: 宋体; font-size: 12.0pt; mso-ascii-font-family: Arial; mso-bidi-font-family: Arial; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Arial;">.</span></b></span><span class="apple-style-span"><b><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Call the Hyphenation function in Abiword. </span></b><o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l6 level1 lfo2; text-indent: -21.0pt;"><!--[if !supportLists]--><span style="color: black; font-family: Wingdings; font-size: 12.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Find split info using enchant_dict_hyphenate</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l6 level1 lfo2; text-indent: -21.0pt;"><!--[if !supportLists]--><span style="color: black; font-family: Wingdings; font-size: 12.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Split Text_Run to split word pass the line width and keep their format</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l6 level1 lfo2; text-indent: -21.0pt;"><!--[if !supportLists]--><span class="apple-style-span"><span style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Deal with user's operation(select, delete, cut, paste)</span><o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l6 level1 lfo2; text-indent: -21.0pt;"><!--[if !supportLists]--><span style="color: black; font-family: Wingdings; font-size: 12.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">User can select weather to enable the hyphenation function</span></span><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;"><o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">3. Simple Implementation of Chinese Spell-Checking in Enchant</span></b><o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l0 level1 lfo3; text-indent: -21.0pt;"><!--[if !supportLists]--><span class="apple-style-span"><span style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Add a simple spell-check framework for Chinese in Enchant</span><o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l0 level1 lfo3; text-indent: -21.0pt;"><!--[if !supportLists]--><span class="apple-style-span"><span style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Add library to support</span><o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l0 level1 lfo3; text-indent: -21.0pt;"><!--[if !supportLists]--><span class="apple-style-span"><span style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Some survey about Chinese Spell-checking </span><o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; text-indent: 0in;"><br />
</div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">4. Code Re-factor and debug</span></b><o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l5 level1 lfo4; text-indent: -21.0pt;"><!--[if !supportLists]--><span style="color: black; font-family: Wingdings; font-size: 12.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Code Re-factor, include keep the code flexible<o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l5 level1 lfo4; text-indent: -21.0pt;"><!--[if !supportLists]--><span style="color: black; font-family: Wingdings; font-size: 12.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Debug coding problem<o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">5. User interface to manage hyphenation</span></b><o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l2 level1 lfo10; text-indent: -21.0pt;"><!--[if !supportLists]--><span class="apple-style-span"><span style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">Windows, Linux, and Cocoa</span><o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">6. How to Support more languages</span></b><o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l9 level1 lfo11; text-indent: -21.0pt;"><!--[if !supportLists]--><span class="apple-style-span"><span style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">How to support more languages in ISpell</span><o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l9 level1 lfo11; text-indent: -21.0pt;"><!--[if !supportLists]--><span class="apple-style-span"><span style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span>Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span></span><!--[endif]--><span class="apple-style-span"><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">How to support more languages in mySepll</span><o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><span class="apple-style-span"><b><span style="background: white; color: black; font-family: Arial; font-size: 12.0pt; mso-bidi-font-family: Arial;">7. How to extend the enchant function</span></b><o:p></o:p></span></div><!--EndFragment-->ChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.com0tag:blogger.com,1999:blog-4307261008427639518.post-72213539823857141172011-08-09T05:24:00.001-07:002011-08-09T05:24:54.875-07:00the works in Enchant<span class="Apple-style-span" style="background-color: white; font-family: arial, sans-serif;">1 add hyphenation function in Enchant<br />
what I have done:<br />
Firstly, I add hyphenation module in Enchant:<br />
================about the code===========<br />
I think we can combine the hyphenation with spell-checking together.<br />
so that we can make the code more flexsible.<br />
In my opinion, we can make code like this:<br />
EnchantDict* enchant_broker_request_dict (EnchantBroker* broker, const<br />
char *const lang); //same as spell-checking<br />
char *enchant_dict_hyphenate(<wbr></wbr>EnchantDict *dict, const char *const<br />
word,size_t len);<br />
<br />
===================== 1<br />
In order to achieve this, we need to add hyphenation function in<br />
EnchantDict. something like:<br />
char **(*hyphenate) (struct str_enchant_dict * me,<br />
const char *const word, size_t len,<br />
size_t * out_n_suggs);<br />
<br />
======================== 2<br />
and the function is implement by the backend.<br />
static char **<br />
ispell_dict_hyphenate (EnchantDict * me, const char *const word,<br />
size_t len, size_t * out_n_suggs)<br />
{<br />
ISpellChecker * checker;<br />
<br />
checker = (ISpellChecker *) me->user_data;<br />
return checker->hyphenate (word, len, out_n_suggs);<br />
}<br />
====================3<br />
finally, we set the connetion<br />
<br />
dict->hyphenate = ispell_dict_hyphenate;<br />
dict->suggest = hspell_dict_hyphenate;<br />
dict->suggest = zemberek_dict_hyphenate;<br />
<br />
2 add five backends to support hyphenation<br />
including ispell, myspell, zemberek, voikko, uspell<br />
<br />
we all know that Enchant has eight types of backend to support multi-language.<br />
USpell<br />
HSpell<br />
ASpell<br />
MySpell....<br />
<br />
but I found that in Abiword. we only use two backends:<br />
libenchant_ispell.dll libenchant_myspell.dll<br />
<br />
another surprising thing is that in the dictionary\ispell I can only<br />
find one dic: american.hash(En_US)<br />
and the hunspell dic is empty~~<br />
<br />
<br />
the changes:<br />
1 deleted the unneed connection, such as HSpell<br />
2 add hunspell(myspell) hyphenation code<br />
3 implement hyphenation using hunspell<br />
4 implement hyphenation using Zemberek<br />
<br />
================1 deleted the unneed connection, such as HSpell===========<br />
Hebrew dont need any hyphenation<br />
Yiddish dont need any hyphenation<br />
<br />
====================2 implement hyphenation using hunspell<br />
added files:<br />
hyphen/hnjalloc.h<br />
hyphen/hnjalloc.c<br />
hyphen/hyph_en_US.dic<br />
hyphen/hyphen.c<br />
hyphen/hyphen.gyp<br />
hyphen/hyphen.h<br />
hyphen/hyphen.patch<br />
hyphen/hyphen.tex<br />
<br />
need more tests<br />
<br />
==================== 3 implement hyphenation using Zemberek<br />
just using dbus_g_proxy_call:<br />
<br />
char* Zemberek::hyphenate(const char* word)<br />
{<br />
char* result;<br />
GError *Error = NULL;<br />
if (!dbus_g_proxy_call (proxy, "hecele", &Error,<br />
G_TYPE_STRING,word,G_TYPE_<wbr></wbr>INVALID,<br />
G_TYPE_STRV, &result,G_TYPE_INVALID)) {<br />
g_error_free (Error);<br />
return NULL;<br />
}<br />
<br />
char*result=0;<br />
return result;<br />
}<br />
<br />
<br />
The attachment is the updated version today. Now we have four backends<br />
of hyphenantion<br />
1 hunspell: using seperated dic: such as hyph_en_us.dic.<br />
we can download dic from internet<br />
2 libhyphenaiton: the dic is provided by author, sometimes limited<br />
3 zemberek: for Turkis<br />
4 Voikko: for Finnish<br />
<br />
<br />
3 the depot of enchant<br />
I just copy the bulid result of enchant:<br />
enchant\bin\Debug\libenchant_<wbr></wbr>myspell.dll ----><br />
abiword\msvc2008\Debug\lib\<wbr></wbr>enchant\libenchant_myspell.dll<br />
enchant\bin\Debug\libenchant_<wbr></wbr>ispell.dll ----><br />
abiword\msvc2008\Debug\lib\<wbr></wbr>enchant\libenchant_ispell.dll<br />
enchant\bin\Debug\libenchant.<wbr></wbr>dll ---->abiword\msvc2008\Debug\<wbr></wbr>bin\ibenchant.dll<br />
<br />
3 the implementation of the five backends<br />
4 call hyphenation module of enchant to display the hyphenation-result<br />
in abiword<br />
5 after user's operation, refresh the hyphenation-result accordingly<br />
include user adding new word, delete word, copy word, cut word<br />
<br />
<br />
6 test in Linux<br />
todo:<br />
1 Fully support hyphenation in Abiword<br />
2 Support more language besides En_us<br />
3 Some tests in Linux(Unix)<br />
<br />
<br />
Still to improve:<br />
1 code re-factor<br />
2 deal with more language<br />
3 include more user's operation(such as operate with picture may<br />
influence the hyphenation result)</span>ChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.com0tag:blogger.com,1999:blog-4307261008427639518.post-17413882158046489862011-08-09T05:23:00.001-07:002011-08-09T05:23:47.694-07:00the summary about What I have done in GSoc2011<span class="Apple-style-span" style="background-color: white; font-family: arial, sans-serif; font-size: 13px;">my works in GSoc2011 including two parts.<br />
1 the hyphenation module in Enchant<br />
Key: to reuse the abstract layer of Enchant and add Hyphenation function<br />
we can add more language easy<br />
Deal with more languages</span><br />
<span class="Apple-style-span" style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"><br />
</span><br />
<span class="Apple-style-span" style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"><br />
</span><br />
<span class="Apple-style-span" style="background-color: white; font-family: arial, sans-serif; font-size: 13px;">2 call in Abiword. including:<br />
split run<br />
find split info<br />
deal with user's operation</span><br />
<span class="Apple-style-span" style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"><br />
</span><br />
<span class="Apple-style-span" style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: x-small;"><br />
</span><br />
<br />
<br />
<span class="Apple-style-span" style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"><br />
</span><br />
<span class="Apple-style-span" style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"><br />
</span><br />
<span class="Apple-style-span" style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"><br />
</span><br />
<span class="Apple-style-span" style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"><br />
</span><br />
ChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.com0tag:blogger.com,1999:blog-4307261008427639518.post-41987714217992346182011-05-17T08:32:00.001-07:002011-05-17T08:32:13.862-07:00new version, but a lot of question~confusing<div>Hi, All.</div><div>I am working on GSoc Abiword this summer to implement the hyphenation support in Abiword. Before I implement the function, I find some code in Abiword for spell-checking. so I follow the code to implement hyphenation function using enchant. And I have some questiones about enchant. thanks</div><div>I want to use enchant to implement hyphenation to keep the dictionary seperately.</div><div> </div><div>the attachment1 is the main class diagram</div><div>the attachment2 is the code I implement the hyphenation follow spell-checking code</div><div> </div><div> </div><div>My question is:</div><div>1. Is there some funcition for hyphenation like enchant_dict_hyphenate in Enchant? </div><div>2. how the enchant achieve the function? I can track in the code in enchant~</div><div>3. give some suggestion to me about my codes, thanks</div><div> </div><div> </div><div> </div><div>Thanks very much~</div>ChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.com0tag:blogger.com,1999:blog-4307261008427639518.post-13743809173807623762011-05-11T18:42:00.000-07:002011-05-13T13:32:13.080-07:00a smiple version.<span class="Apple-style-span" style="font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 14px; line-height: 13px;">a smiple version. </span><br />
<span class="Apple-style-span" style="font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 14px; line-height: 13px;">You own the copyright for whatever work you do. All of your work must</span><span class="Apple-style-span" style="font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 14px; line-height: 13px;"><br />
</span><span class="Apple-style-span" style="font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 14px; line-height: 13px;">be licensed under the GPL2 or later. Please add your name + email</span><span class="Apple-style-span" style="font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 14px; line-height: 13px;"><br />
</span><span class="Apple-style-span" style="font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 14px; line-height: 13px;">address to the headers of each file that you touch.</span>ChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.com0tag:blogger.com,1999:blog-4307261008427639518.post-56481430431230975262011-05-04T08:27:00.001-07:002011-05-04T08:27:46.638-07:00Start coding about Hyphenation in ABiword now. One week I can make it a preliminary result~~~<span class="Apple-style-span" style="font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 14px; line-height: 13px;">Start coding about Hyphenation in ABiword now. One week I can make it a preliminary result~~~</span><br />
<span class="Apple-style-span" style="font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 14px; line-height: 13px;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 14px; line-height: 13px;">wait for me~</span>ChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.com0tag:blogger.com,1999:blog-4307261008427639518.post-45778348595074785242011-04-27T08:25:00.000-07:002011-04-27T08:25:22.812-07:00patch file_Implement progress bar in windowsThe patch file I have modified in the following spaces, to keep same with the source code:<br />
==================1 ap_usb_ProgressListener======<br />
create a class to deal with ProgressListener(the same as the gtk code). seperate from the statusBarListener<br />
class ap_usb_ProgressListener : public AP_StatusBarFieldListener<br />
{<br />
public:<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>.............<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>virtual void notify(); //deal with progressbar update<br />
protected:<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>HWND m_ProgressWND;<br />
};<br />
==================2======<br />
and in the notify function deal with the update: and i find the place to add pulse process bar<br />
void ap_usb_ProgressListener::notify()<br />
{ <span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if(pProgress->isDefinate())<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>double fraction = pProgress->getFraction();<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>SendMessage(m_ProgressWND,PBM_SETPOS,fraction*100,0);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>else<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{ //here pulse process bar <--------------pulse process bar<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
}<br />
===========================3============<br />
In this situation, I need to build the connection between ap_usb_ProgressListener and ProcessBar in the createWindow() in this place, your code have one error(the elseif is in the wrong place)<br />
else if(pf->getFillMethod() == PROGRESS_BAR)<br />
{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>pf->setListener((AP_StatusBarFieldListener *)(new ap_usb_ProgressListener(pf, m_hwndProgressBar)));<br />
}<br />
===========================4============<br />
Remove unused function and variables<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.com0tag:blogger.com,1999:blog-4307261008427639518.post-71536005678240641162011-04-27T07:26:00.003-07:002011-04-27T07:26:43.258-07:00Why should we expose the SpellCheck interface in EnchantI have read much code about enchant and want to implement hyphenation using enchant<br />
but I have one question in the FL_DocLayout.cpp where spellcheck used. I think the SpeellManager is enough to deal with our problem, Why should we expose the SpellCheck interface in Enchant. that is not safe<br />
<br />
<br />
one more question, if we use enchant for abstraction of dictionaries. but most dictionaries have different format. how to analysis the different format of dictionary<br />
I think the analysis of dictionary is done by the library the dictionay provide, the enchant is just Responsible for call it<br />
<br />
some different idea?ChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.com0tag:blogger.com,1999:blog-4307261008427639518.post-90863050575788323772011-04-27T07:24:00.002-07:002011-04-27T07:24:47.701-07:00Share of some understanding about Source code<div>Recently I try to implement the process bar in windows. and I read a lot of source code, I make a summary of that. I want to share with you all, I hope that is helpfull to you all. </div><div>Anyone interested in that pls disscus with me, Thank you.</div><div> </div><div>the attachment is the class diagram in UML format. we can see that:</div><div> </div><div>1. the AP_StatusBar is an abstract class represent the status bar.</div><div> And the Windows AP_Win32StatusBar inherited from AP_StatusBar</div><div>And in the AP_StatusBar contain the interface elements——m_vecFields(vector of StatusBarField) and processField(processBar). </div><div>But they are all the abstract class AP_StatusBarField. And the concreate class is AP_StatusBarFidld_ProcessBar / ap_sbf_pageInfo /ap_sbf_StatusMessage/ ap_sbf_InputMode / ap_sbf_Language.</div><div> </div><div>AP_StatusBarField_ProcessBar: present the processBar</div><div>ap_sbf_pageInfo: present pageInfo</div><div>ap_sbf_StatusMessage:present StatusMessage</div><div>ap_sbf_InputMode: present InputMode</div><div>ap_sbf_Language: present Language</div><div> </div><div>2. And the event-handler of the interface elements are all in the following format:</div><div> firstly, creating the event-handler Listener </div><div> then build the connection between them</div><div> override the notify function in the Listener to handler the event</div><div> </div><div> every interface element has Listener class:</div><div>AP_StatusBarFidld_ProcessBar: ap_usb_processListener</div><div>ap_sbf_pageInfo: ap_usb_TextListener</div><div>ap_sbf_StatusMessage: ap_usb_TextListener</div><div>ap_sbf_InputMode: ap_usb_TextListener</div><div>ap_sbf_Language: ap_usb_TextListener</div><div> </div><div>all the listener are all inherit from the Ap_StatusBarFieldListener. </div><div>and the event are all handled in the notify function.</div><div> </div><div>3. in the AP_Win32StatusBar.</div><div> the createWindow function create the HWNDs and make connection with their listener</div><div>AP_Win32StatusBar::createWindow:</div><div>for (UT_sint32 k = 0; k < getFields()-> getItemCount(); k++) </div><div>{ </div><div> pf-> setListener(...));</div><div>}</div>ChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.com0tag:blogger.com,1999:blog-4307261008427639518.post-30139888714112494062011-04-27T07:24:00.000-07:002011-04-27T07:24:00.765-07:00libhyphenate<div><span style="color: navy;">I use libhyphenate to implement the hyphenation sucessfully. And then refer to the source code of libhyphenate.</span></div><div><span style="color: navy;">In libhyphenate, it is easy to carry out the hyphenation.</span></div><div><span style="color: navy;"></span></div><div><span style="color: navy;">#include <libhyphenate\Hyphenator.h></span></div><div><span style="color: navy;">#include <iostream></span></div><div><span style="color: navy;">using namespace Hyphenate;</span></div><div><span style="color: navy;">using namespace std;</span></div><div><span style="color: navy;">int main () {</span></div><div><span style="color: navy;"> Hyphenator(RFC_3066::Language("en")).hyphenate("example.txt","output.txt") ;</span></div><div><span style="color: navy;"> return 0;</span></div><div><span style="color: navy;">}</span></div><div><span style="color: navy;"></span> </div><div><span style="color: navy;">the input is the txt file, and the output file is correctly in the hyphenation format. now, I read the source code of libhyphenate to find what we can refer to libhyphenate.</span></div><div><span style="color: navy;"></span> </div><div><span style="color: navy;"><strong><span>But I found one problem, the dictionary is not enough in the libhyphenate. And I replace with <span lang="EN-US" style="font-family: 'Calibri','sans-serif'; font-size: 10.5pt; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: 宋体; mso-fareast-language: ZH-CN; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-latin;">Webster's New International Dictionary , also have some problems, because the interface is different. </span></span></strong></span></div><div><span style="color: navy;"><span lang="EN-US" style="font-family: 'Calibri','sans-serif'; font-size: 10.5pt; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: 宋体; mso-fareast-language: ZH-CN; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-latin;"><span><strong>Although the author of libhyphenate make the algorithm and the dictionary seperately, so that you can add your own dictionary to deal with your language.</strong></span></span></span></div>ChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.com0tag:blogger.com,1999:blog-4307261008427639518.post-26450566883431382682011-04-27T07:22:00.001-07:002011-04-27T07:22:43.173-07:00Some Open Source libraries about hyphenation<div class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span lang="EN-US"><span style="color: navy; font-size: small;">=============================1======================</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span lang="EN-US"><span style="color: navy; font-size: small;">I think hyphenation is locale dependent because in different languages, some data type such as number and date are different from each other. So we must find a method support for many different Languages besides English. AbiWord is the word processor for everybody, not just English speakers. </span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 0pt;"><br />
</div><div class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span lang="EN-US"> </span></div><div><span style="color: navy;">=============3 Some Open Source libraries about hyphenation =========================</span></div><div><span style="color: navy;">I have searched some Open Source libraries we can use to determine word break points. </span></div><div><span style="color: navy;">There is a wide range of different free open source solutions for spell-checking and hyphenation by computer.</span></div><div><span style="color: navy;">1. libhyphenate- An hyphenation library for C++, LGPL Hyphenation Library. </span></div><div><span style="color: navy;">Developer Steve Wolter has released Version 1.0 of Libhyphenate, his C++ hyphenation library. Libhyphenate implements the hyphenation algorithm also used by the Tex layout system. The library currently supports hyphenation libraries for English, German and French. More languages can be generated from the corresponding Tex files. </span></div><div><span style="color: navy;">2. In the thesis” Word Hyphenation by Computer” mention a lot of library. I think we can read that.</span></div><div><span style="color: navy;">3. wordaxe : Hyphenation by decomposition of compound words</span></div><div><span style="color: navy;">4. SyFi: A C++ library built on top of the symbolic math library GiNaC. </span></div><div><span style="color: navy;">===============some python and other language libraries we can refer to===============</span></div><div><span style="color: navy;">1 PyHyphen: Hyphenation module for Python programs with the ability to automatically hyphenate words using an algorithm which is based on decomposition of compound words into base words, and is named DCWHyphenator in the code.</span></div><div><span style="color: navy;">2 Pslib is a C-library to create PostScript files on the fly. It offers text rendering including hyphenation, kerning and ligatures. </span></div><div><span style="color: navy;">3 XHTML hyphenator: XHTML hyphenator is a hyphenation program for XHTML documents.</span></div><div><span style="color: navy;"></span></div><div><span><span style="color: navy;">I will spend more time to care about the C++ hyphenation library.</span> </span></div><div><span></span> </div>ChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.com0tag:blogger.com,1999:blog-4307261008427639518.post-43322146116836014562011-04-27T02:31:00.000-07:002011-04-27T02:31:36.239-07:00Time Plan about implementation of Hyphenation support in AbiWordFirst version of my time plan. I will make a detailed disscusion with my mentor<br />
<br />
<br />
<div align="center" class="MsoNormal" style="text-align: center;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="color: #f79646; font-size: 24.0pt; mso-bidi-font-size: 11.0pt; mso-themecolor: accent6;">Time Plan about implementation of Hyphenation support in AbiWord<o:p></o:p></span></b></div><div align="right" class="MsoNormal" style="mso-outline-level: 1; text-align: right;"><span lang="EN-US" style="color: #d99594; font-size: 20.0pt; mso-bidi-font-size: 11.0pt; mso-themecolor: accent2; mso-themetint: 153;">Chen Xiajian<o:p></o:p></span></div><div align="right" class="MsoNormal" style="mso-outline-level: 1; text-align: right;"><br />
</div><table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background: #F9F9F9; border-collapse: collapse; border: none; mso-border-alt: solid #AAAAAA .75pt; mso-yfti-tbllook: 1184;"><tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0;"> <td style="background: #F2F2F2; border: solid #AAAAAA 1.0pt; mso-border-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="color: #00b0f0; font-size: 12.0pt;">Date <o:p></o:p></span></b></div></td> <td style="background: #F2F2F2; border-left: none; border: solid #AAAAAA 1.0pt; mso-border-alt: solid #AAAAAA .75pt; mso-border-left-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="color: #00b0f0; font-size: 12.0pt;">Plan to do <o:p></o:p></span></b></div></td> </tr>
<tr style="mso-yfti-irow: 1;"> <td style="border-top: none; border: solid #AAAAAA 1.0pt; mso-border-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="color: #00b0f0; font-size: 12.0pt;">Week 1 <o:p></o:p></span></b></div></td> <td style="border-bottom: solid #AAAAAA 1.0pt; border-left: none; border-right: solid #AAAAAA 1.0pt; border-top: none; mso-border-alt: solid #AAAAAA .75pt; mso-border-left-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">1 Read more about Enchant and get familiar with the use of Enchant in AbiWord (this step will make an abstraction of the hyphenation algorithm)<o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">2 Search and find more libraries which can be used to determine the breakpoints within words. Includes:<o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 42.0pt; mso-char-indent-count: 0; mso-list: l0 level2 lfo2; text-indent: -21.0pt;"><!--[if !supportLists]--><span lang="EN-US" style="font-family: Wingdings; font-size: 12.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span lang="EN-US" style="font-size: 12.0pt;">Some TeX formatting system <o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 42.0pt; mso-char-indent-count: 0; mso-list: l0 level2 lfo2; text-indent: -21.0pt;"><!--[if !supportLists]--><span lang="EN-US" style="font-family: Wingdings; font-size: 12.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span lang="EN-US" style="font-size: 12.0pt;">Open Source libraries<o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 42.0pt; mso-char-indent-count: 0; mso-list: l0 level2 lfo2; text-indent: -21.0pt;"><!--[if !supportLists]--><span lang="EN-US" style="font-family: Wingdings; font-size: 12.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span lang="EN-US" style="font-size: 12.0pt;">If possible pull out just the code we need from some package.<span style="mso-spacerun: yes;"> </span><o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 42.0pt; mso-char-indent-count: 0; mso-list: l0 level2 lfo2; text-indent: -21.0pt;"><!--[if !supportLists]--><span lang="EN-US" style="font-family: Wingdings; font-size: 12.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span lang="EN-US" style="font-size: 12.0pt;">Care about the language factors(besides English)<o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">3 Learn more about Hyphenation algorithm<o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-size: 12.0pt;">Deliverable 1</span></b><span lang="EN-US" style="font-size: 12.0pt;">: <o:p></o:p></span></div><div align="left" class="MsoNormal" style="text-align: left;"><span lang="EN-US" style="font-size: 12.0pt;">Make a summary about Enchant and the open source hyphenation libraries<o:p></o:p></span></div><div align="left" class="MsoNormal" style="text-align: left;"><span lang="EN-US" style="font-size: 12.0pt;">Choose one most suitable for us<o:p></o:p></span></div></td> </tr>
<tr style="mso-yfti-irow: 2;"> <td style="border-top: none; border: solid #AAAAAA 1.0pt; mso-border-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="color: #00b0f0; font-size: 12.0pt;">Week 2 </span></b><span lang="EN-US" style="font-size: 12.0pt;"><o:p></o:p></span></div></td> <td style="border-bottom: solid #AAAAAA 1.0pt; border-left: none; border-right: solid #AAAAAA 1.0pt; border-top: none; mso-border-alt: solid #AAAAAA .75pt; mso-border-left-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><a href="" name="Rewrite_language.php_file_as_an_abstract"></a><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-size: 12.0pt;">(continue and finish)<span style="mso-spacerun: yes;"> </span><o:p></o:p></span></b></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">1 Some programming test about Open Source hyphenation libraries<o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">2 Make a code framework about where to add code(to make code more flexible)<o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">3 <b style="mso-bidi-font-weight: normal;">Design the data structures of Hyphenation</b><o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">4 Building the <b style="mso-bidi-font-weight: normal;">hyphenationChecker</b> using open source library in Enchant<o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">hyphenationChecker is the name I define in Enchant to deal with hyphenation<o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-size: 12.0pt;">Deliverable 2: <o:p></o:p></span></b></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">1 Summary Document <o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">2 Patch about data structures of Hyphenation<b style="mso-bidi-font-weight: normal;"><o:p></o:p></b></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">3 Make an <b style="mso-bidi-font-weight: normal;">patch</b> about hyphenationChecker<o:p></o:p></span></div></td> </tr>
<tr style="mso-yfti-irow: 3;"> <td style="border-top: none; border: solid #AAAAAA 1.0pt; mso-border-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="color: #00b0f0; font-size: 12.0pt;">Week 3</span></b><span lang="EN-US" style="font-size: 12.0pt;"> <o:p></o:p></span></div></td> <td style="border-bottom: solid #AAAAAA 1.0pt; border-left: none; border-right: solid #AAAAAA 1.0pt; border-top: none; mso-border-alt: solid #AAAAAA .75pt; mso-border-left-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">1 Fix possibly remaining bugs to have a good foundation for the further. <o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">2 Read source code and place hyphenation points called from the Enchant<o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">The codes in src/text/fmt/xp/*.(h,cpp)<o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l1 level1 lfo1; text-indent: -21.0pt;"><!--[if !supportLists]--><span lang="EN-US" style="font-family: Wingdings; font-size: 12.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span lang="EN-US" style="font-size: 12.0pt;">fb_LineBreaker.(h,cpp) and<o:p></o:p></span></div><div class="MsoListParagraph" style="margin-left: 21.0pt; mso-char-indent-count: 0; mso-list: l1 level1 lfo1; text-indent: -21.0pt;"><!--[if !supportLists]--><span lang="EN-US" style="font-family: Wingdings; font-size: 12.0pt; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span lang="EN-US" style="font-size: 12.0pt;">fb_Alignment.(h,cpp)<o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-size: 12.0pt;">Deliverable 3: <o:p></o:p></span></b></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">1 Make an patch about implementation of hyphenation points<o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">2 Fix remaining bugs <o:p></o:p></span></div></td> </tr>
<tr style="mso-yfti-irow: 4;"> <td style="border-top: none; border: solid #AAAAAA 1.0pt; mso-border-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="color: #00b0f0; font-size: 12.0pt;">Week 4 </span></b><span lang="EN-US" style="font-size: 12.0pt;"><o:p></o:p></span></div></td> <td style="border-bottom: solid #AAAAAA 1.0pt; border-left: none; border-right: solid #AAAAAA 1.0pt; border-top: none; mso-border-alt: solid #AAAAAA .75pt; mso-border-left-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">1 Draw the hyphenation characters in AbiWord<o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">2 Find more good dictionary to have a good </span><span lang="EN-US" style="background: white; font-family: "Tahoma","sans-serif"; font-size: 10.0pt; mso-font-kerning: 0pt; mso-highlight: white;">coverage</span><span lang="EN-US" style="font-family: "Tahoma","sans-serif"; font-size: 10.0pt; mso-font-kerning: 0pt;"> of different language and words</span><span lang="EN-US" style="font-size: 12.0pt;"><o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-size: 12.0pt;">Deliverable 4:</span></b><span lang="EN-US" style="font-size: 12.0pt;"> <o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">1 Make an patch about preliminary results<o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">2 Make a summary of dictionary<o:p></o:p></span></div></td> </tr>
<tr style="mso-yfti-irow: 5;"> <td style="border-top: none; border: solid #AAAAAA 1.0pt; mso-border-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="color: #00b0f0; font-size: 12.0pt;">Week 5</span></b><span lang="EN-US" style="font-size: 12.0pt;"> <o:p></o:p></span></div></td> <td style="border-bottom: solid #AAAAAA 1.0pt; border-left: none; border-right: solid #AAAAAA 1.0pt; border-top: none; mso-border-alt: solid #AAAAAA .75pt; mso-border-left-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-size: 12.0pt;">(continue and finish) <o:p></o:p></span></b></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">According to Martin, it seems that it's a difficult task. Time is needed. <o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">1 Have more tests<o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">2 Again, Fix possibly remaining bugs <o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">3 Prepare some document that Google required in Mid Evaluation<o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-size: 12.0pt;">Deliverable 5:<o:p></o:p></span></b></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">1 Fix remaining bugs<o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">2 Some document that Google require<o:p></o:p></span></div></td> </tr>
<tr style="mso-yfti-irow: 6;"> <td style="border-top: none; border: solid #AAAAAA 1.0pt; mso-border-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="color: #00b0f0; font-size: 12.0pt;">July 15 </span></b><span lang="EN-US" style="font-size: 12.0pt;"><o:p></o:p></span></div></td> <td style="border-bottom: solid #AAAAAA 1.0pt; border-left: none; border-right: solid #AAAAAA 1.0pt; border-top: none; mso-border-alt: solid #AAAAAA .75pt; mso-border-left-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">Mid Evaluation <o:p></o:p></span></div></td> </tr>
<tr style="mso-yfti-irow: 7;"> <td style="border-top: none; border: solid #AAAAAA 1.0pt; mso-border-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="color: #00b0f0; font-size: 12.0pt;">Week 6 </span></b><span lang="EN-US" style="font-size: 12.0pt;"><o:p></o:p></span></div></td> <td style="border-bottom: solid #AAAAAA 1.0pt; border-left: none; border-right: solid #AAAAAA 1.0pt; border-top: none; mso-border-alt: solid #AAAAAA .75pt; mso-border-left-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><a href="" name="Provide_a_module_to_use_the_apertium.org"></a><span lang="EN-US" style="font-size: 12.0pt;">1 Care about some special languages and special words<o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-size: 12.0pt;">Deliverable 6: <o:p></o:p></span></b></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">1 Have an more good result to support more language and words<o:p></o:p></span></div></td> </tr>
<tr style="mso-yfti-irow: 8;"> <td style="border-top: none; border: solid #AAAAAA 1.0pt; mso-border-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="color: #00b0f0; font-size: 12.0pt;">Week 7 </span></b><span lang="EN-US" style="font-size: 12.0pt;"><o:p></o:p></span></div></td> <td style="border-bottom: solid #AAAAAA 1.0pt; border-left: none; border-right: solid #AAAAAA 1.0pt; border-top: none; mso-border-alt: solid #AAAAAA .75pt; mso-border-left-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">Rejoin hyphenated words as they get moved via the users editing.<o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">Codes: <span style="mso-spacerun: yes;"> </span>src/text/fmt/xp/fl_BlockLayout.cpp<o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">More tests<o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-size: 12.0pt;">Deliverable 7: <o:p></o:p></span></b></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">Patch about implementation of this function<o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">More tests<o:p></o:p></span></div></td> </tr>
<tr style="mso-yfti-irow: 9;"> <td style="border-top: none; border: solid #AAAAAA 1.0pt; mso-border-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="color: #00b0f0; font-size: 12.0pt;">Week 8</span></b><span lang="EN-US" style="font-size: 12.0pt;"> <o:p></o:p></span></div></td> <td style="border-bottom: solid #AAAAAA 1.0pt; border-left: none; border-right: solid #AAAAAA 1.0pt; border-top: none; mso-border-alt: solid #AAAAAA .75pt; mso-border-left-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><a href="" name="Improve_integration_with_Wikipedia_.E2.8"></a><span lang="EN-US" style="font-size: 12.0pt;">1 deal with the result: misspell words are correctly handled after hyphenation. <o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">2 Test and Refactor <o:p></o:p></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-size: 12.0pt;">Deliverable 8: <o:p></o:p></span></b></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">1 Patch about implementation of this function<o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">2 better version<o:p></o:p></span></div></td> </tr>
<tr style="mso-yfti-irow: 10;"> <td style="border-top: none; border: solid #AAAAAA 1.0pt; mso-border-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="color: #00b0f0; font-size: 12.0pt;">Week 9 </span></b><span lang="EN-US" style="font-size: 12.0pt;"><o:p></o:p></span></div></td> <td style="border-bottom: solid #AAAAAA 1.0pt; border-left: none; border-right: solid #AAAAAA 1.0pt; border-top: none; mso-border-alt: solid #AAAAAA .75pt; mso-border-left-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-size: 12.0pt;">(continue and finish) <o:p></o:p></span></b></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;"><span style="mso-spacerun: yes;"> </span>1 Fix new or remaining bugs<o:p></o:p></span></div><div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;"><span style="mso-spacerun: yes;"> </span>2 Some documents what GsoC needed<o:p></o:p></span></div></td> </tr>
<tr style="mso-yfti-irow: 11;"> <td style="border-top: none; border: solid #AAAAAA 1.0pt; mso-border-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="color: #00b0f0; font-size: 12.0pt;">Week 10</span></b><span lang="EN-US" style="font-size: 12.0pt;"> <o:p></o:p></span></div></td> <td style="border-bottom: solid #AAAAAA 1.0pt; border-left: none; border-right: solid #AAAAAA 1.0pt; border-top: none; mso-border-alt: solid #AAAAAA .75pt; mso-border-left-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-size: 12.0pt;">(continue and finish) <o:p></o:p></span></b></div><div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-size: 12.0pt;">Time for emergency<o:p></o:p></span></b></div></td> </tr>
<tr style="mso-yfti-irow: 12;"> <td style="border-top: none; border: solid #AAAAAA 1.0pt; mso-border-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="color: #00b0f0; font-size: 12.0pt;">August 16 </span></b><span lang="EN-US" style="font-size: 12.0pt;"><o:p></o:p></span></div></td> <td style="border-bottom: solid #AAAAAA 1.0pt; border-left: none; border-right: solid #AAAAAA 1.0pt; border-top: none; mso-border-alt: solid #AAAAAA .75pt; mso-border-left-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">Suggested 'pencils down' date. Take to scrub code, write tests, improve documentation, etc. <o:p></o:p></span></div></td> </tr>
<tr style="mso-yfti-irow: 13; mso-yfti-lastrow: yes;"> <td style="border-top: none; border: solid #AAAAAA 1.0pt; mso-border-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="color: #00b0f0; font-size: 12.0pt;">August 26 </span></b><span lang="EN-US" style="font-size: 12.0pt;"><o:p></o:p></span></div></td> <td style="border-bottom: solid #AAAAAA 1.0pt; border-left: none; border-right: solid #AAAAAA 1.0pt; border-top: none; mso-border-alt: solid #AAAAAA .75pt; mso-border-left-alt: solid #AAAAAA .75pt; mso-border-top-alt: solid #AAAAAA .75pt; padding: 2.4pt 2.4pt 2.4pt 2.4pt;"> <div class="MsoNormal"><span lang="EN-US" style="font-size: 12.0pt;">End <o:p></o:p></span></div></td> </tr>
</tbody></table><div class="MsoNormal"><br />
</div>ChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.com0tag:blogger.com,1999:blog-4307261008427639518.post-2155112539086674672011-04-27T02:30:00.000-07:002011-04-27T02:30:16.820-07:00Congratulations!Get Selected~<br />
<br />
Thank all the people who give me suggestion<br />
I will make a good result in my GSoc2011<br />
<br />
my GSoc2011: Add Hyphenation Support to AbiWordChenXiajian_My GSoc2011_Hyphenation Support to AbiWordhttp://www.blogger.com/profile/14915172551075912267noreply@blogger.com0