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

chapter 1 [ar] - section 1/1 and section 1/2 #92

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

hkhdair
Copy link

@hkhdair hkhdair commented Apr 5, 2022

I added the Arabic translation of chapter 2, section 1- Introduction, and 2- NLP. I also added _toctree.yml file for the first sections being translated right now. This is still a work in progress, I welcome any comments and/or reviews.

issue number : #53

@lewtun lewtun mentioned this pull request Apr 5, 2022
69 tasks
Copy link
Member

@lewtun lewtun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this excellent contribution @HishamKhdair 🔥 ! From my side, the only thing to change is the _toctree.yml file to remove chapter 0

@@ -0,0 +1,11 @@
- title: 0. الإعداد
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove this section as the docs won't render if we don't have the corresponding MDX file

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lewtun I will add only the sections that I worked on

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. I will continue working on other sections of chapter 2 in the same manner.

@@ -0,0 +1,58 @@

<div dir="rtl" style="direction:rtl;text-align:right;">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on figuring this out! I saw we have the same issue with RTL languages in other translations and this seems to be the best way to work around the problem for now

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, HTML tag is the best workaround for RTL languages. This works for any RTL language.

Copy link
Contributor

@giyaseddin giyaseddin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your initiative, nice work :)

فيما يلي نظرة عامة موجزة عن الدورة:

<div class="flex justify-center">
<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter1/summary.svg" alt="Brief overview of the chapters of the course.">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we translate the figures as well.
@lewtun what do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We currently don't have an easy mechanism for community member to contribute to the documentation-images repo, but we're working on making this possible. I suggest we leave the images in English for now and then revisit this once we can :)

<div class="flex justify-center">
<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter1/summary.svg" alt="Brief overview of the chapters of the course.">

- تقدم الفصول من 1 إلى 4 مقدمة للمفاهيم الرئيسية لمكتبة Transformers🤗. بنهاية هذا الجزء من الدورة التدريبية ، ستكون على دراية بكيفية عمل نماذج المحولات Transformer وستعرف كيفية استخدام نموذج من [Hugging Face Hub] (https://huggingface.co/models) ، تعديله علي مجموعة بيانات محددة ومشاركة نتائجك على Hub!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In .MD format there is no space between brackets and URL parentheses [Hypertext](URL)

هذه الدورة:

* تتطلب معرفة جيدة بلغة البرمجة Python
* من الأفضل أخذ هذه الدورة بعد دورة تعليمية تمهيدية ، مثل [fast.ai's] (https://www.fast.ai) [التعلم العميق العملي للمبرمجين] (https://course.fast.ai) أو أحد البرامج التي طورتها [DeepLearning.AI] (https://www.deeplearning.ai)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.


<Youtube id="00GKzGyWFEs" />

ستعلمك هذه الدورة التدريبية حول معالجة اللغة الطبيعية (NLP) باستخدام مكتبات من نظام [Hugging Face🤗] (https://huggingface.co) - [Transformers🤗] (https://github.com/huggingface/transformers) و [Datasets🤗] (https://github.com/huggingface/datasets) و [Tokenizer🤗] (https://github.com/huggingface/tokenizers) و [Accelerate🤗] (https://github.com/huggingface/accelerate) وكذلك [Hugging Face Hub] (https://huggingface.co/models). و هذا كله مجاني تمامًا وبدون إعلانات.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the word منظومة may be better translation for Echosystem

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @giyaseddin. it's good to agree on using the same terms for translating the upcoming sections, for consistency.


عن المؤلفين:

**Matthew Carrigan** مهندس تعلم الآلة في Hugging Face. يعيش في دبلن بأيرلندا وعمل سابقًا كمهندس ML في Parse.ly وقبل ذلك كان باحثًا بعد الدكتوراه في Trinity College Dublin. إنه لا يعتقد أننا سنصل إلى الذكاء الاصطناعي العام من خلال توسيع البيئات الحالية ، ولكن لديه آمال كبيرة في خلود الروبوت بغض النظر عن ذلك.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest wrapping paragraphs that start with EN words with

<div style="direction:rtl;">
</div>

because these sentences are hard to read backward->forward->backward etc.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for suggesting this @giyaseddin! @HishamKhdair if you need some additional guidance, I suggest checking out how the Farsi files were translated in the chapters/fa folder

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comments @giyaseddin and @lewtun .

You might be not able to read it only inside .md file but the rendered page works very well. The whole content is wrapped with <div dir="rtl"> , and all sounds alright.

I checked and verified this with "Markdown Preview Enhanced" in vscode in addition to other markdown live preview tools. All seems to be correct and intact.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed this by checking this link, direction confusion -especially code snippets- which might as you said not be the actual production rendering. Can't wait to see the final result.

@hkhdair hkhdair changed the title chapter 2 [ar] - work in progress chapter 1 [ar] - work in progress Apr 13, 2022
@lewtun
Copy link
Member

lewtun commented Apr 20, 2022

Hey @HishamKhdair just checking if you need any help from myself or @giyaseddin on this PR - I think it just needs a few minor tweaks and it's ready to go!

@hkhdair hkhdair changed the title chapter 1 [ar] - work in progress chapter 1 [ar] - section 1/1 and section 1/2 Apr 24, 2022
@hkhdair
Copy link
Author

hkhdair commented Apr 24, 2022

Hey @lewtun Section 1/1 and section 1/2 of chapter 1 are now complete. I considered all reviews, worked on some broken right-to-left embeddings in both files, and made other minor edits to the text.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

@lewtun
Copy link
Member

lewtun commented May 3, 2022

Thanks for iterating on this @hkhdair ! It seems the RTL alignment doesn't quite work for chapter1/1.mdx - would you mind seeing if it's easy to fix?

In case you wish to preview the content locally, you can first install the doc-builder lib with

pip install git+https://github.com/huggingface/doc-builder.git

and then run

doc-builder preview course ../course/chapters/ar --not_python_module

Screen Shot 2022-05-03 at 16 34 41

@hkhdair
Copy link
Author

hkhdair commented May 15, 2022

Thanks for iterating on this @hkhdair ! It seems the RTL alignment doesn't quite work for chapter1/1.mdx - would you mind seeing if it's easy to fix?

In case you wish to preview the content locally, you can first install the doc-builder lib with

pip install git+https://github.com/huggingface/doc-builder.git

and then run

doc-builder preview course ../course/chapters/ar --not_python_module

Screen Shot 2022-05-03 at 16 34 41

Hi @lewtun I am really sorry for the late reply, I was not able to check this repo for a while.

I installed doc-builder as you suggested, but I was not able to preview the content locally, it went into a number of errors, I tried to fix them one by one, but still the local preview didn't work.

Anyway, I figured out that the above problem might be because of the centered image, I added another fix by wrapping it in a <div>. Would you please check if this has fixed the problem?

All .md live previews I used show that it is working fine, you can also see that everything seems intact from this file view. Hope this works now. If this is still not working, any suggestions?

@giyaseddin
Copy link
Contributor

Hello @hkhdair
Thanks for the updates.
in this file view some of the hypertext links aren't formatted well (in the EN version, it's just a clickable text, and the url isn't visible)

Otherwise, everything seems Ok.

@lewtun
Copy link
Member

lewtun commented Aug 15, 2022

Hey @hkhdair thanks a lot for fixing the centring issues with the figure - it now looks great! As @giyaseddin points out, there's one final issue with the hyptertext links:

Screen Shot 2022-08-15 at 10 50 55

Would you like to have a go at fixing them?

@lunarflu
Copy link
Member

cc @hkhdair @giyaseddin Hey folks! 🤗 We're wrapping up some of the older PRs for this repo; Anything else to do for this one?

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

Successfully merging this pull request may close these issues.

5 participants