Title

mkes -- Generate English oral sentences from a user-supplied prompt phrase

Syntax

mkes "prompt" [, n(#) output(filename) replace]

mkes , units(#) [mode(string) n(#) output(filename) replace start(#)]

mkes --list

Description

mkes is a spoken English sentence generator. Provide a short
daily-English prompt phrase -- for example, "There is no",
"I want to", or "Can you" -- and the program automatically
produces sentences sharing the same grammatical structure. Every English
sentence is paired with a complete Chinese translation, so learners see
the full meaning at a glance.

New in v3.1: Multi-unit mode. Specify how many practice units you want
via units(#) and the program generates a single output file
containing multiple spoken-English units -- each featuring a different
sentence pattern -- ready for one-click import into the Dingyuan Accounting
LAN spoken English module. Choose between sequential and random pattern
selection modes.

The program ships with 300 sentence patterns spanning grammar
fundamentals and 23 daily-life and work scenarios -- habits, purpose,
comfort, gratitude, anticipation, preferences, senses, explanation, opinions,
suggestions, plans, reminders, advantages, interests, emotions, apologies,
inquiries, time, eating and drinking, wishes, discussing, asking around,
invitations -- supported by over 1,050 English-Chinese word/phrase
pairs across 31 word banks. The engine is written in Python and runs inside
Stata via the python integration (requires Stata 16+ with
Python configured).

Smart fallback: if a prompt does not exactly match any known pattern, the
program uses heuristics to guess the appropriate word type and generates
sentences anyway.

Options

Single-Prompt Mode (original)

n(#) -- Number of sentences to generate; default is n(10).
Sentences are randomly drawn from the built-in word banks without replacement.

output(filename) -- Output filename without extension; default is
mkes_output. The program appends .txt automatically.

replace -- Overwrite an existing output file of the same name.

--list -- List all 300 supported sentence pattern templates with their
match keys and available word counts.

Multi-Unit Mode (new in v3.1)

When units(#) is specified with a value greater than 0, the
program enters multi-unit mode. It automatically selects multiple distinct
sentence patterns and generates a complete multi-unit practice file in a
single run.

units(#) -- Number of spoken-English practice units to generate.
Each unit uses a different sentence pattern. Required for multi-unit mode.

mode(string) -- Pattern selection mode. Options:

sequential (default) -- Pick patterns in order from the pattern database,
starting from the index specified by start().

random -- Pick patterns randomly without replacement. Each run produces
a different set. Use start() as a random seed for reproducible results.

start(#) -- Starting pattern number or random seed. Default is start(1).

In sequential mode: pattern number to start from (e.g.,
start(50) starts from pattern p050 "I think"). Use mkes --list
to see all pattern numbers. Wraps around if the end is reached.

In random mode: random seed for reproducible pattern selection.
Values > 1 set a fixed seed; omit or use start(1) for system randomness.

n(#) -- Sentences per unit; default is n(10).

output(filename) and replace -- Same as single-prompt mode.

Examples

Single-prompt mode:

. mkes "I'm", n(30) output(output)

Generates 30 sentences starting with "I'm ...", saved as output.txt

. mkes "There is no", n(15)

Generates 15 "There is no ..." sentences, saved as mkes_output.txt

. mkes "Can you", n(10) replace

Generates 10 "Can you ...?" questions, overwriting mkes_output.txt

Multi-unit mode (new v3.1):

. mkes , units(3) mode(sequential) n(5) replace

Generates 3 units in order (p001, p002, p003), 5 sentences each -> mkes_output.txt

. mkes , units(5) mode(random) n(10) output(daily_practice) replace

Generates 5 units with random patterns, 10 sentences each -> daily_practice.txt

. mkes , units(3) mode(sequential) start(50) n(8) output(mid_patterns) replace

Generates 3 units starting from pattern p050, 8 sentences each

. mkes , units(10) n(5) output(quick_review) replace

Generates 10 units in sequential order (default mode), 5 sentences each

Scenario-based prompts (single-prompt):

. mkes "I usually", n(10) replace

Habit sentences

. mkes "Don't worry", n(5) output(comfort)

Comfort and encouragement sentences

. mkes "Why don't you", n(8) replace

Suggestion sentences

List all available patterns:

. mkes --list

Displays all 300 supported sentence patterns

Output Format

Each output file is a UTF-8 text file. In single-prompt mode, one unit is
written. In multi-unit mode, multiple units are concatenated, each with its
own header.

# Unit 1:Pattern title with variants

English sentence | Chinese translation

Example output for mkes "Can you", n(3):

Can you help me? | 你能帮我吗？

Can you wait for me? | 你能等我吗？

Can you lend me? | 你能借给我吗？

Example output for mkes , units(2) mode(sequential) n(2):

# Unit 1:There is / are / was / were / will be (no)...

There is no time. | 没有时间。

There is no reply. | 没有回应。

# Unit 2:There is / are / was / were a / an / some...

There is a problem. | 有一个问题。

There is a chance. | 有一个机会。

Output files can be imported directly into the Dingyuan Accounting LAN
(D:/dingyuan-system) "Spoken English" training module via the
one-click import function.

Supported Pattern Categories

Part I -- Grammar Foundations

(patterns p001--p311)

1. There be existential patterns (There is no/a, There are, There was/were)

2. I have / I've got possession patterns

3. I want / I'd like desire patterns

4. I can / I could ability patterns

5. Can you / Could you request patterns

6. I think / I believe opinion patterns

7. It is / It's descriptive patterns

8. I need / I must / I should necessity patterns

9. I like / I love / I enjoy preference patterns

10. I hope / I wish desire patterns

11. I'm / I am state patterns

12. I'm going to / I will future patterns

13. I've / I have done perfect patterns

14. I used to / I'm used to habitual patterns

15. How / What question patterns

16. Let's / Let me imperative patterns

17. This is / That is demonstrative patterns

18. I'm trying to / I'm working on progressive patterns

19. I'm sorry / I'm afraid emotional patterns

20. Do you / Did you yes-no question patterns

21. It's important / It's hard evaluative patterns

22. I remember / I forget memory patterns

23. Thank you / Thanks for gratitude patterns

24. If I / If you conditional patterns

25. One of / Some of quantity patterns

26. I was past state patterns

27. I've been / I've had experience patterns

28. I'm looking forward to anticipation patterns

29. I wonder / I was wondering curiosity patterns

30. I'd rather / I'd better preference patterns

31. He is / She is / They are third-person patterns

32. I get / I feel change-of-state patterns

Part II -- Daily Life and Work Scenarios

(patterns p312--p459, new in v3.1.0)

33. Habits -- I usually, I often, I always, I rarely, I never, I tend to

34. Purpose -- I came here to, In order to, My goal is to, So that I can

35. Comfort -- Don't worry, It's okay, Cheer up, I'm here for you

36. Gratitude -- I'm grateful for, I owe you one for, Much appreciated

37. Anticipation -- I can't wait to, I'm excited about, I'm eager to

38. Preferences -- I'm fond of, I'm crazy about, I'm a big fan of

39. Senses -- It sounds, It tastes, It smells, It feels, That sounds like

40. Explanation -- The reason is that, That's because, Let me explain, To be honest

41. Opinions -- As far as I'm concerned, From my perspective, Personally, I think

42. Suggestions -- I suggest you, Why don't you, Have you considered, You could try

43. Plans -- I intend to, I'm planning on, My plan is to

44. Reminders -- Don't forget to, Remember to, Make sure you, Be sure to

45. Advantages -- The advantage is that, One benefit is that, The best part is

46. Interests -- I'm interested in, My hobby is, I'm passionate about, I'm learning to

47. Emotions -- It makes me, I can't help feeling

48. Apologies -- I apologize for, I didn't mean to, I regret, I shouldn't have

49. Inquiries -- Could you tell me, I'd like to know, Do you happen to know

50. Time -- It takes, How long does it take to, It's been, When do you usually

51. Eating and Drinking -- Would you like some, Let's grab, I'm in the mood for, Have you tried

52. Wishes -- I wish I could, If only I could, I dream of, Someday I will

53. Discussing -- Speaking of, Let's talk about, Regarding, What do you think about

54. Asking Around -- I was wondering if, Have you ever heard of, I'm curious about

55. Invitations -- Would you like to join me for, Are you free for, Why don't we

Requirements

Stata 16.0 or later with Python integration configured.

. python query

If Python is not configured:

. python search

. set python_exec <path>, permanently

Installation

Place mkes.ado and mkes.sthlp in your Stata personal ado directory:

. personal

Or add the program directory temporarily with adopath:

. adopath + "E:/mkes"

Integration

Output files can be imported directly into the Dingyuan Accounting LAN
(D:/dingyuan-system) "Spoken English" training module via the
one-click import function.

Acknowledgments

Since late July 2025, the Dingyuan Accounting (鼎园会计) team has
developed a suite of 39 empirical-accounting Stata programs and integrated them
into mysuite. Users can batch-download all programs at once by typing:

ssc install mysuite, replace

mysuite, all download

The team subsequently built the Dingyuan Accounting teaching-and-research
integrated LAN (D:/dingyuan-system), which includes a built-in "Spoken
English" learning module. Users upload a Word (.docx) or plain-text
(.txt) file with one click; the system automatically parses and imports
the content. Learners can then practise spoken English in three modes --
sentence-by-sentence follow-reading, sequential playback, or random playback.
mkes was purpose-built to generate the spoken-English text files required
by this learning module.

We extend our sincere gratitude to Professor Christopher F. Baum for his
invaluable guidance and strong support of the Dingyuan Accounting team's
programme-development work.

Authors

WU Lianghai

School of Business, Anhui University of Technology (AHUT)

Ma'anshan, China

Email: agd2010@yeah.net

WU Hanyan

Department of Accountancy, City University of Hong Kong (CityU)

Email: 2325476320@qq.com

Version

3.1.0 -- 2026-08-11 (multi-unit mode; 300 patterns, 55 categories, 1,050+ word pairs; Stata 16+ with Python)

Also see

mysuite --
Dingyuan Accounting suite of 39 empirical-accounting Stata programs