Unit 1 Expert systems with Python

Learning outcomes

By the end of this unit you should:

  • know the main components of an expert system
  • be able to name examples of different language-related expert systems
  • have considered (briefly) user needs for expert systems related to language learning

Activity 1: Your tutor

Listen to this introduction to find out the name of your teacher and how to contact him on campus and via email.

your tutor

Activity 2: Your course

Read the introduction below:

The official university course syllabus provides details of the grade percentages awarded to participation, quizzes and final assessment.

The course divides into two parts: (1) expert systems, and (2) prototype development. You will work individually, in pairs or teams to understand the theory and practical applications of different expert sysems. You will work in teams to develop a prototype. For students who can program in Python and prefer not to work in teams, you can form a team of one.

Active participation is defined (by me) as submitting assignments or completing assigned tasks via the learning management system ( ELMS ).

In general, each assignment or task is awarded either zero or 100%. Most assignments involve solving problems. This emoticon is used to remind you of these. Quizzes are conducted either online or live. The final assignment is the creation of a prototype expert system. For this assignment, you need to design, develop and evaluate an original tool. Your group will need to submit three items, namely the source code, a written report and a video evaluation.

Activity 3: Your classmates

Introduce yourself to your classmates. State your:

  1. preferred name,
  2. experience using Python,
  3. current knowledge level of machine learning,
  4. practical experience of using machine learning, and
  5. the reason why you selected this course.

Once you have introduced yourselves, discuss what you know about expert systems.

Activity 4: Course content

Read the following.

The course divides into two parts:

  • knowledge acquistion, and
  • prototype development.

In the knowledge acquisition part, we focus on the core concepts of time and tense. In the prototype developmet part we focus on visualization of language.

Expert systems

The first four units are dedicated to understanding the different types of expert systems and practising using, adapting and creating expert systems for increasing sophisticated tasks. The four units to be covered are:

  1. Introduction to expert systems
  2. Knowledge engineering
  3. Types of expert systems
  4. Case studies

The next five units focus on the practical application of expert systems. These units are designed to help your team create a high-fidelity prototype for an expert system that addresses your assigned or approved task. The five units to be covered are:

  1. Problem breakdown
  2. Expert system design
  3. Prototype design
  4. Prototype development
  5. Prototype evaluation

The final unit brings together the key concepts covered during the course, and itemizes all the technical terminology and concepts that you should understand by the end of the course.

  1. Review

Prototype development

In this part, different visualization tools are introduced. This is followed by a brief introduction to different natural language pipelines. The lion's share of this part will be spent on prototype development. This prototype needs to be evaluated and so methods of evaluation are also covered. The final unit aims to review the course, bringing together all the core concepts covered.

  1. Python for Natural Language Processing (NLP), including Natural Language ToolKit (NLTK)
  2. Problem breakdown
  3. Prototype development: idea generation, design and development
  4. Prototype evaluation: usability, accuracy and efficacy
  5. Revision

The courses comprises 14 sessions and 10 units. the first half of the course will focus on Units 1 to 5. The remainder of the course will focus on Units 6 to 10.

Activity 5: General introduction to expert systems

Read this general introduction to expert systems, which was generated by ChatGPT-4.

Expert systems are a category of artificial intelligence (AI) software. They use knowledge and procedures from experts in a certain field to solve complex problems. These systems are able to make decisions like human experts. The core of an expert system is the knowledge base. This is a structured database filled with expert knowledge. The knowledge is often represented as rules or facts. Another key part is the inference engine. This is a program that applies logic to the knowledge from the knowledge base. It forms conclusions, solves problems, or gives advice.

Forward chaining and backward chaining are methods used in expert systems, especially in rule-based systems, to infer conclusions from given data. Forward chaining starts with the known information and uses inference rules to extract more data until a desired goal is achieved. Backward chaining works in the opposite direction. It starts with a goal, and then looks for facts or rules that support this goal.

Expert systems can explain their reasoning. Expert systems have a feature called explanation facility. This makes them transparent and trustworthy. They are used in many fields. Medicine, finance, and engineering are some examples. They help make complex decisions, diagnose diseases, predict trends, and more. Expert systems cannot replace human experts completely. They cannot learn from experiences like humans. Yet, they are a valuable tool when human expertise is scarce or decisions must be made quickly.

Work in pairs. Without looking at the paragraph above, describe what an expert system is. Describe the main components of an expert system, and state the two abilities that a system does not possess.

Activity 6: Examples of language-related expert systems

Work in pairs. Discuss which of these expert systems you have used. How successful were the systems?

  1. Machine Translation Systems e.g. DeepL and GoogleTranslate
  2. Natural Language Processing (NLP) Systems: e.g. ChatGPT
  3. Speech Recognition Systems e.g. Apple Dictation, Windows Speech Recognition Windows logo key + Ctrl + S
  4. Grammar check Systems e.g. Grammarly
  5. Information Extraction Systems e.g. Search engines, Email filters, News aggregators

Activity 7: Expert systems for UoA language learners

Work in groups. Discuss possible expert systems that could be developed to address the following problems.

  1. Tenses, e.g. will future or going-to future
  2. Articles, e.g. a, an, the or ∅
  3. Stressed syllables, e.g. baNAna
  4. Punctuation e.g. comma pairs and semicolons
  5. Adjective order e.g. beautiful old ivory statue or old ivory beautiful statue


Can you:

  1. describe the components and functionalities of an expert system
  2. list five common tyes of language-related expert systems
  3. explain the following terms: expert system, knowledge base, rules, facts, inference engine, forward chaining, backward chaining and explanation facility

If you do not, make sure that you do before your next class.

Running count: 8 of 30 concepts covered so far.