<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi Troy,</p>
    <p>Thanks for your response on this! There's still a lot for me to
      learn regarding the Sword engine.</p>
    <p>Never heard about TEI before, I need to read up on this!<br>
      <br>
      Is there any other Sword frontend as of today that is working with
      the Entry Attributes for any dictionaries?<br>
    </p>
    <p>Best regards,<br>
      Tobias<br>
      <br>
    </p>
    <div class="moz-cite-prefix">On 11/9/19 10:54 PM, Troy A. Griffitts
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:6c0a589b-5068-4fcc-0f33-dcd4afa66c9f@crosswire.org">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p>Dear Tobias,</p>
      <p>Yes, our StrongsGreek and StrongsHebrew modules need work.  I
        know the Xiphos repo has improved Strongs modules.  I was
        actually surprised to see that our Strongs modules are still not
        using any SourceType entry in the .conf file.  They should be
        updated to use TEI, as this is what we decided to use for
        lexicon markup, but I guess never updated our modules.</p>
      <p>Regarding your use case.  In SWORD, the common way for parsing
        out and making available useful information which might be found
        in a module entry is the EntryAttributes mechanism.  This would
        allow requests like:</p>
      module.getEntryAttributes()["Word"]["Transcription"]["Main"];<br>
      module.getEntryAttributes()["Word"]["Transcription"]["Phonetic"];<br>
      module.getEntryAttributes()["Definition"]["Body"]["Text"];<br>
      module.getEntryAttributes()["Reference"]["000"]["Text"];<br>
      module.getEntryAttributes()["Reference"]["000"]["EntryKey"];<br>
      module.getEntryAttributes()["Reference"]["001"]["Text"];<br>
      module.getEntryAttributes()["Reference"]["001"]["EntryKey"];
      <p><br>
      </p>
      <p>If you haven't used EntryAttributes in SWORD yet, have a look
        at something like the KJV with the tool:
        sword/examples/cmdline/lookup.  This utility prints out all the
        entry attributes associated with an entry (among other things).</p>
      <p>You may have noticed, above, one quirk with SWORD Entry
        Attributes in that they are always referenced by a 3 level key. 
        Searches are done using / notation with empty segments and
        trailing '.' designating wildcards, e.g., Word//Lemma./G1234/. 
        This would find any entry in the KJV with an EntryAttribute
        having strongs G1234 in the "Lemma.*" entries for any Word
        number.</p>
      <p>So, to implement what you want, I would suggest we update our
        StrongsGreek and StrongsHebrew with markup and use info from a
        source we know we can designate the copyright information (this
        is my concern from other lexicon data out there).  We could talk
        with Tyndale about the pedigree of their data for their Greek
        and Hebrew Strong definitions and possibly finalize a module we
        could share, or improve on ours with data from various sources
        we can cite, like <a
          href="http://crosswire.org/svn/sword-tools/trunk/flashtools/"
          moz-do-not-send="true">http://crosswire.org/svn/sword-tools/trunk/flashtools/</a>
        for adding "RealGreek" and "RealHebrew" word headings to our
        current lexica.</p>
      <p>What we should really start with is a TEI markup of our current
        lexica, if we decide to improve our current modules.</p>
      <p>THEN, with markup in place, parsing the entries into entry
        attributes would be really simple by adding a filter... in fact,
        looking for an example, I strangely found:</p>
      <p><a
href="http://crosswire.org/svn/sword/trunk/src/modules/filters/greeklexattribs.cpp"
          moz-do-not-send="true">http://crosswire.org/svn/sword/trunk/src/modules/filters/greeklexattribs.cpp</a></p>
      <p>I wonder if we use this filter on any module, currently...</p>
      <p>Troy</p>
      <p><br>
      </p>
      <p><br>
      </p>
      <p><br>
      </p>
      On 11/9/19 3:31 AM, Tobias Klein wrote:<br>
      <blockquote type="cite"
        cite="mid:fe5951c9-525d-f7eb-2e13-aa1e1918d0ef@tklein.info">
        <meta http-equiv="content-type" content="text/html;
          charset=UTF-8">
        <p>Hi,</p>
        <p>I'm currently working on Strong's support for Ezra Project.</p>
        <p>I've been implementing a Strong's parsing functionality that
          enables flexible formatting of the Strong's definitions (from
          StrongsGreek and StrongsHebrew) in my frontend.<br>
          Without this functionality the frontend would have to "dump"
          the definition of a Strong's key and it wouldn't have freedom
          in how the definition is formatted / layed out.<br>
          Having this functionality available, the frontend can work
          with individual parts of the Strong's definition and apply
          specific formatting and layout.<br>
          The parsing divides a Strong's entry into:<br>
          - Transcription<br>
          - Phonetic transcription<br>
          - Definition<br>
          - List of references<br>
          <br>
          In case of Ezra Project the formatting looks like this now: <a
href="https://raw.githubusercontent.com/tobias-klein/ezra-project/master/screenshots/strongs_formatting_example.png"
            moz-do-not-send="true">https://raw.githubusercontent.com/tobias-klein/ezra-project/master/screenshots/strongs_formatting_example.png</a><br>
          <br>
          I'm pasting the definition of my StrongsEntry class below,
          which is the base for this implementation (see <a
href="https://github.com/tobias-klein/node-sword-interface/blob/master/src/strongs_entry.hpp"
            moz-do-not-send="true">https://github.com/tobias-klein/node-sword-interface/blob/master/src/strongs_entry.hpp</a>):<br>
        </p>
        <div style="color: #d4d4d4;background-color: #1e1e1e;font-family: 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback';font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"><div><span style="color: #569cd6;">class</span><span style="color: #d4d4d4;"> </span><span style="color: #4ec9b0;">StrongsEntry</span></div><div><span style="color: #d4d4d4;">{</span></div><div><span style="color: #569cd6;">public:</span></div><div><span style="color: #d4d4d4;">    </span><span style="color: #dcdcaa;">StrongsEntry</span><span style="color: #d4d4d4;">(</span><span style="color: #4ec9b0;">std</span><span style="color: #d4d4d4;">::</span><span style="color: #4ec9b0;">string</span><span style="color: #d4d4d4;"> </span><span style="color: #9cdcfe;">key</span><span style="color: #d4d4d4;">, </span><span style="color: #4ec9b0;">std</span><span style="color: #d4d4d4;">::</span><span style="color: #4ec9b0;">string</span><span style="color: #d4d4d4;"> </span><span style="color: #9cdcfe;">rawEntry</span><span style="color: #d4d4d4;">);</span></div><div><span style="color: #d4d4d4;">    </span><span style="color: #569cd6;">virtual</span><span style="color: #d4d4d4;"> </span><span style="color: #dcdcaa;">~StrongsEntry</span><span style="color: #d4d4d4;">(){}</span></div>
<div><span style="color: #d4d4d4;">    </span><span style="color: #569cd6;">static</span><span style="color: #d4d4d4;"> </span><span style="color: #4ec9b0;">StrongsEntry</span><span style="color: #569cd6;">*</span><span style="color: #d4d4d4;"> </span><span style="color: #dcdcaa;">getStrongsEntry</span><span style="color: #d4d4d4;">(</span><span style="color: #4ec9b0;">sword</span><span style="color: #d4d4d4;">::</span><span style="color: #4ec9b0;">SWModule</span><span style="color: #569cd6;">*</span><span style="color: #d4d4d4;"> </span><span style="color: #9cdcfe;">module</span><span style="color: #d4d4d4;">, </span><span style="color: #4ec9b0;">std</span><span style="color: #d4d4d4;">::</span><span style="color: #4ec9b0;">string</span><span style="color: #d4d4d4;"> </span><span style="color: #9cdcfe;">key</span><span style="color: #d4d4d4;">);</span></div>
<div><span style="color: #d4d4d4;">    </span><span style="color: #4ec9b0;">std</span><span style="color: #d4d4d4;">::string rawEntry;</span></div><div><span style="color: #d4d4d4;">    </span><span style="color: #4ec9b0;">std</span><span style="color: #d4d4d4;">::string key;</span></div><div><span style="color: #d4d4d4;">    </span><span style="color: #4ec9b0;">std</span><span style="color: #d4d4d4;">::string transcription;</span></div><div><span style="color: #d4d4d4;">    </span><span style="color: #4ec9b0;">std</span><span style="color: #d4d4d4;">::string phoneticTranscription;</span></div><div><span style="color: #d4d4d4;">    </span><span style="color: #4ec9b0;">std</span><span style="color: #d4d4d4;">::string definition;</span></div><div><span style="color: #d4d4d4;">    </span><span style="color: #4ec9b0;">std</span><span style="color: #d4d4d4;">::vector</span><span style="color: #d4d4d4;">&lt;</span><span style="color: #d4d4d4;">StrongsReference</span><span style="color: #d4d4d4;">&gt;</span><span style="color: #d4d4d4;"> references;</span></div>
<div><span style="color: #569cd6;">private:</span></div><div><span style="color: #d4d4d4;">    </span><span style="color: #569cd6;">void</span><span style="color: #d4d4d4;"> </span><span style="color: #dcdcaa;">parseFromRawEntry</span><span style="color: #d4d4d4;">(</span><span style="color: #4ec9b0;">std</span><span style="color: #d4d4d4;">::</span><span style="color: #4ec9b0;">string</span><span style="color: #d4d4d4;"> </span><span style="color: #9cdcfe;">rawEntry</span><span style="color: #d4d4d4;">);</span></div><div><span style="color: #d4d4d4;">    </span><span style="color: #569cd6;">void</span><span style="color: #d4d4d4;"> </span><span style="color: #dcdcaa;">parseFirstLine</span><span style="color: #d4d4d4;">(</span><span style="color: #4ec9b0;">std</span><span style="color: #d4d4d4;">::</span><span style="color: #4ec9b0;">string</span><span style="color: #d4d4d4;"> </span><span style="color: #9cdcfe;">firstLine</span><span style="color: #d4d4d4;">);</span></div><div><span style="color: #d4d4d4;">    </span><span style="color: #569cd6;">void</span><span style="color: #d4d4d4;"> </span><span style="color: #dcdcaa;">eraseEmptyLines</span><span style="color: #d4d4d4;">(</span><span style="color: #4ec9b0;">std</span><span style="color: #d4d4d4;">::</span><span style="color: #4ec9b0;">vector</span><span style="color: #d4d4d4;">&lt;</span><span style="color: #4ec9b0;">std</span><span style="color: #d4d4d4;">::</span><span style="color: #4ec9b0;">string</span><span style="color: #d4d4d4;">&gt;</span><span style="color: #569cd6;">&amp;</span><span style="color: #d4d4d4;"> </span><span style="color: #9cdcfe;">lines</span><span style="color: #d4d4d4;">);</span></div><div><span style="color: #d4d4d4;">    </span><span style="color: #569cd6;">void</span><span style="color: #d4d4d4;"> </span><span style="color: #dcdcaa;">parseDefinitionAndReferences</span><span style="color: #d4d4d4;">(</span><span style="color: #4ec9b0;">std</span><span style="color: #d4d4d4;">::</span><span style="color: #4ec9b0;">vector</span><span style="color: #d4d4d4;">&lt;</span><span style="color: #4ec9b0;">std</span><span style="color: #d4d4d4;">::</span><span style="color: #4ec9b0;">string</span><span style="color: #d4d4d4;">&gt;</span><span style="color: #569cd6;">&amp;</span><span style="color: #d4d4d4;"> </span><span style="color: #9cdcfe;">lines</span><span style="color: #d4d4d4;">);</span></div><div><span style="color: #d4d4d4;">};</span></div></div>
        <p>Now I'm wondering whether something like this could actually
          be useful as part of the Sword engine, since the use case of
          "flexible Strong's formatting" may also be relevant for other
          frontends.<br>
        </p>
        <p>Best regards,<br>
          Tobias<br>
        </p>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <pre class="moz-quote-pre" wrap="">_______________________________________________
sword-devel mailing list: <a class="moz-txt-link-abbreviated" href="mailto:sword-devel@crosswire.org" moz-do-not-send="true">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://www.crosswire.org/mailman/listinfo/sword-devel" moz-do-not-send="true">http://www.crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page</pre>
      </blockquote>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
sword-devel mailing list: <a class="moz-txt-link-abbreviated" href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page</pre>
    </blockquote>
  </body>
</html>