الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

أرجوكم ساعدوني في أول مشروع يطلب مني

مغلق
بدأه ASEM في 19 أبريل 2003 · 4 رد · 794 مشاهدة · في الأسئلة المجابة
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم...

يا جماعة عندي مشروع مطلوب مني تسليم ADT للمشروع بعد اسبوعين وبعد ذلك باسبوعين ايضا يتم تسليم المشروع والبرنامج كامل بلغة سي..

المشكله انه صار لي فتره ماني عارف كيف أبدأ بالمشروع ابداً يعني المشروع وهدفه بالنسبه لي واضح..لكن ما ادري كيف أبدأ ولا الخطوات اللي بتسهل علي الحل.. أرجوكم يا جماعة ساعدوني في الحل.. المشروع كتبته وأضفته هنا باللغة الانجليزية.. وإذا في أي سؤال مش واضح ارجو انكم تستفسروا عنه.. بصراحه يا جماعة المشروع هذا عقبة لحد الان امام 133 طالب أرجو منكم المساعده وانكم تدلونا على اول الطريق واتركوا لنا الباقي.. مابي اطول كلام.. وهذا المشروع بين اياديكم.. واتمنى انه يكون واضح ومفهوم وفكرته سهله التعامل..

SMART AND POWERFUL SEARCH

INTRODUTION

The main objective of this project is implement a powerful meta-language which permits a compact way of describing complex search patterns in the text. As an example, suppose that someone named: Ahmed Mohammad Omar and we have to find this name (with all possible combination) in a list. Using our Smart and Powerful Search (SPS) if we use the pattern:

(Ahmed | A . ) ? ( Mohammad | . ) ? Omar

The above pattern means: pick a string the first of which is either "Ahmed" or "A." followed by an optional single space after which is either "Mohammed" or "M." (both optional) a single space and then "Omar". It will catch all the following variations: A. Omar, A.M. Omar, A. M. Omar, Ahmed Omar, Ahmed M. Omar, A. Mohammad Omar, and Ahmed Mohammad Omar.

Another example, consider the pattern:

[A-Za-z0-9_ ]+@([A-Za-z_ ]+.){2,3}(com | edu | net | gov) .sa

This powerful pattern will match most of the valid email addresses in Saudi Arabia. I would like rather skip describing how to write such an expression but it dose serve showing the power behind such.

Now back to our project. The aim is to write a program SPS which accepts two inputs. The input is the pattern to match (written using the meta-language and input though command line argument), and second the file to operate on. The SPS will output all the matching lines highlighting the matched text.

Operations

Your SPS program will recognize the following symbols

1. The Wildcard Symbol

The "." symbol matches a single occurrence of any character (except newline). For example: s . n matches the following English words: sun, sin, san, and many others which may not make sense such as sbn, scn, .. .. Similarly the pattern: …ing matches six-letter words that end with ing.

2. The Optionality Symbol

The symbol "?" indicates that the immediately preceding expression is optional. The expression colou?r matches both Britich and American spellings, colour and color.

3. The Symbol for repeatability

There are two symbol that indicate that the immediately preceding expression is repeatable. The "+" symbol indicate repeatability of >= 1 times , while "*" indicates repeatability of >=0 times. Example, ba+b matches the bab, baab, baaab, …

4. The grouping symbol

The symbol "(…)" groups a series of patter element to single element. We can combine this symbol with our symbols of optionality or repeatability. For example, expression a(bc)?d matches the words: ad, and abcd. While the expression a(bc)*d matches the words: ad, abcd, abcbcd, abcbcbcd,…

5. Choices

Wildcard symbol is very effective but there are times when we want to limit the set of character which the wildcard can match. There are four different ways of expressing choices:

• The "[…]" notation which denotes a class of characters to match. For example, the expression p[aou]t matches the words: pat, pot, and put. In case the characters in the class are contiguous then we write it using a hyphen between the first and last character in the class. The expression [ b – e ]x matches bx, cx, dx, and ex.

• The "[^…]"notation that negates the class of characters to match. For example, p[^a – c]x matches the words: pdx, …, pxx, pAx, pBx, …,pOx, p1x, …i.e matches any word with p followed by any character other than a, b, or c then x.

• The notation "(…|…|…)" matches one of the alternatives. Consider for example the pattern, Ahmad ( Ali| Abbas ) Ziad matches the names: Ahmed Ali Ziad, or Ahmad Abbas Zaid.

And as with grouping, we can combine the choices with symbols of optionality or repeatability. The expression p[aou]+t matches: pat, paut, puat, puoat, … while a ( bc | de )*f matches: af, abcf, adef, abcdef, abcbcdebcf, …

6. Matching Meta Chars

each character matches itself, unless it is one of the above special symbols. To match any of these special symbols you need to add "" before it. For example, [ abc+]

will match [abc], [abcc],…

some notes: the algorithm should be smart enough to handle some of the mare awkward cases. Consider the expression ab*ba, it should matches: bab, baab, baaab, … Another example a (bc) + (bc) *d must match:abcd, abcbcd, …

#2

شبااااب ما يصير؟؟ يا مبرمجيييييييييين مش معقووووول ؟؟؟؟

16 قارئ للموضوع ولا حتى تعليق واحد :(

أرجوكم يا جماعه..اذا في شي مو واضح استفسروا عنه.. والله ابغا احد يدلني على الطريقة اللي ابدأ فيها ما ابي اكثر من كذا.. ولا حتى بالرسم فقط..(f)

#3

يا ريت تفسر اكتر بالعربى مضمون المشروع لانه فى كلمات كتير بالانجليزى صعبه شويه وان شاء الله هتلاقى حل ليه عندنا

وشكرا.

#4

ترجمه ومالك الا احله

#5

السلام عليكم جميعا ً

انا عندي نفس المشروع ودي تساعدوني بعد وراح أترجملكم قدر ماأستطيع

البرنامج يطلب بحث smart and powerfull search

وطريقة تنفيذه هي أنه راح يستقبل ملفين

الملف الأول فيه الكلمات اللي يريد بحثها واللي أذا احتوت على رموز يكون لها أحراءات خاصه والرموز بأشرحها تحت

الملف الثاني يحتوي على النص ( اللي نبحث فبه )

الحين ارجع لرموز اللي فيها كل الصعوبه

1- الرمز (.)

وعناها انه يمكن يكون مكانها أي حرف

ex: a.b ممكن تكون ---> aab ,abb ,acb ,azb ,a7b

2- الرمز (؟)

وعناها ان الحرف اللي قبلها أختياري

ex: colou?r ---> color ,colour

3- الرمزين(+) (*) التكرار

(+)تتكرر مرة أو أكثر (>1)

ex: ab+c --> abc, abbc, abbbc

(*)ممكن ماتوجد او تتكرر مره أو أكثر (>0)

ex: ab*c -->ac, abc ,abbc, abbbc

4- الأقواس ( ( ) )

تعامل كل اللي داخل القوس على أنه حرف واحد وممكن سوي عليها الرموز السابقه

ex: a(abc)?d --->ad, aabcd

5- الأختيار

أ- ( [ ] ) وهي تختار حرف واحد فقط

ex: a[abc]d --->aad, abd, acd

وأذا جت داخلها( - ) فهي تعني مجموعة الحروف من إلى

ex: a[a-d]f -->aaf, abf, acf , adf

ب- ( ^ ) يعني جميع الحروف بأستناء اللي بعدها

ex: a[^ad]f --->abf, acf, awf ....

ex: a[^a-d]f ---> aff, akf ...

ج- ( | | )

تختار واحد

ex: a(abc|edf)h --->aabch, aedfh

وممكن تجي بعدها الرموز السابقه

ex: a(ab|ed)*h --->ah, aabh, aedh, aedababh

6- ( )

وضيفتها أنك تقدر تستخدن جميع الرموز السابقه كحرف في الكلمه

ex: a?b ---->a?b

a(bc)de ---->a(bc)de

والمطلوب في المشروع 1- ADT

2- المشروع كامل

وأعذروني أذا كان فيه شي مهو واضح

هذا الموضوع مغلق.

مواضيع مشابهة

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…