Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to indicate examples inside sense #60

Closed
ilius opened this issue Dec 27, 2020 · 6 comments
Closed

How to indicate examples inside sense #60

ilius opened this issue Dec 27, 2020 · 6 comments

Comments

@ilius
Copy link

ilius commented Dec 27, 2020

I'd like to know what's the standard (or the best) way to indicate examples of a term, inside a sense.

Here is what I'm doing currently:

<sense n="1" xml:lang="fa">
	<gramGrp>
		<pos norm="adjective">صفت</pos>
	</gramGrp>
	<sense xml:lang="fa">
		<def>
			definition...
			<p class="example">
				<div xml:lang="en">example 1 ...</div>
				<div xml:lang="fa">tranlation of example 1 ...</div>
				<div xml:lang="en">example 2 ...</div>
				<div xml:lang="fa">tranlation of example 2 ...</div>
			</p>
		</def>
	</sense>
</sense>

Or maybe I should use <p type="example"> instead of <p class="example">

I'd also consider this:

<sense n="1" xml:lang="fa">
	<gramGrp>
		<pos norm="adjective">صفت</pos>
	</gramGrp>
	<sense xml:lang="fa">
		<def>
			definition...
			<br/>
			<spanGrp type="example">
				<span xml:lang="en">example 1 ...</span>
				<br/>
				<span xml:lang="fa">tranlation of example 1 ...</span>
			</spanGrp>
			<br/>
			<spanGrp type="example">
				<span xml:lang="en">example 2 ...</span>
				<br/>
				<span xml:lang="fa">tranlation of example 2 ...</span>
			</spanGrp>
		</def>
	</sense>
</sense>

I suppose <span> is like HTML and does not add newlines, that's why I added these <br/>

The reason xml:lang= attributes are specificed is to change the direction of text, and possibly style (text color, font etc) when rendering to HTML.

I looked at more than 20 existing FreeDict dictionaries and didn't find anything like this.

Thanks in advance

@ilius ilius changed the title How to indicate examples within sense How to indicate examples inside sense Dec 28, 2020
@respiranto
Copy link
Collaborator

respiranto commented Jan 1, 2021 via email

@ilius
Copy link
Author

ilius commented Jan 2, 2021

Thanks for your response.
I will go with a.2

By the way, I do not see no actual translations of the headwords. Do I assume correctly that you simply omitted them?

No, the translation was definition... inside <def>

But I'm switching from <def> to <cit>

One reason I chose <def> over <cit> was that in the existing glossaries like eng-deu.tei, <cit> tags are all directly under first-level <sense> which is under <entry>.
Unlike <def> which is under second-level <sense>.
For example:

<entry>
  <form>
    <orth>-'s</orth>
    <pron>/s/</pron>
    <pron>/z/</pron>
    <pron>/əz/</pron>
    <pron>/ɪz/</pron>
  </form>
  <gramGrp>
    <pos>particle</pos>
  </gramGrp>
  <sense>
    <cit type="trans" xml:lang="de">
      <quote>-s</quote>
      <quote>der</quote>
      <quote>des</quote>
      <quote>von</quote>
    </cit>
    <sense>
      <def>possessive marker</def>
    </sense>
  </sense>
</entry>

So my question: is it okay to use <cit> under second-level <sense>?

For example in my case:

<entry>
	<form xml:lang="en">
		<orth>a</orth>
		<pron>ǝ</pron>
	</form>
	<sense n="1" xml:lang="fa">
		<gramGrp>
			<pos norm="adjective">صفت</pos>
		</gramGrp>
		<sense xml:lang="fa">
			<cit type="trans">
				<quote>translation...</quote>
			</cit>
			<cit type="example">
				<quote xml:lang="en">I see a man</quote>
				<cit type="trans" xml:lang="fa">
					<quote>(translation of: I see a man)</quote>
				</cit>
			</cit>
			<cit type="example">
				<quote xml:lang="en">once a day</quote>
				<cit type="trans" xml:lang="fa">
					<quote>(translation of: once a day)</quote>
				</cit>
			</cit>
		</sense>
		<sense xml:lang="fa">
			...
		</sense>
	</sense>
</entry>

@ilius ilius closed this as completed Jan 2, 2021
@ilius ilius reopened this Jan 2, 2021
@respiranto
Copy link
Collaborator

respiranto commented Jan 2, 2021 via email

@ilius
Copy link
Author

ilius commented Jan 2, 2021

Thanks.
That clears it up.
I will update my tei file and PyGlossary accordingly.

@ilius ilius closed this as completed Jan 2, 2021
@ilius
Copy link
Author

ilius commented Jan 2, 2021

Do you think I should add my Persian <-> English glossary here?
It's about 85 MB, which is bigger than Github's max recommended size, 50 MB.
Although there are 2 other big files here as well:

93M	jpn-eng/jpn-eng.tei
72M	jpn-deu/jpn-deu.tei

@humenda
Copy link
Member

humenda commented Jan 9, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants