.MATE- A Menstruation Guide

4 minute read

This program reads from a text file, which contains most searched queries of Menstruation topic, and uses user input to find the necessary information. User can interact with the program by typing statements. The primary audience of this program is ill-informed individuals who want to explore more about female menstruation and women’s health. However, please note that everyone is open to use it as they please. Furthermore, there is a Calendar tool, which user can users get their next period. It allows prompts as well and will guide you accordingly.

This program is purposefully designed to not have any selection menu so every interaction between you and the program should be genuine. Program interaction is very simple, for instance, if you want to say “what is a Period?” Or, ” can a woman’s period change?!” Then you would type that, completely, no special format is needed. You may make spelling errors, or accidentally hit number, or misplace a punctuation or, you may feel asleep while pressing the space bar. Fret not, this program can handle these types of user errors. However, please note that excessive spelling errors do lead to bad answers. It is advised to double-check what you want to ask. Your input matters!

Where your input is needed precisely, the program would tell you. Otherwise, it would react in an obvious way which you weren’t expecting. In these cases, unfortunately, you can only do what’s being prompted.

Moreover, if you would like to see next period day, type “Hey! I want to calculate my next period?” Or, you can type “I am planning a vacation with my wife so….?” When you type these type of phrases, the program will prompt you for information and in the end, it will make you a calendar which you can modify, print and plan your family vacation, resort trip etc. according to what your relative and you see fit.

When you’re done & want to close the program, you can type, “Exit the program! Bye!” And the program will close.

Please feel free to look through the source code here.

When the program start, you’re greeted with a welcome screen like this here (that colour bar below slowly fills up too, it’s pretty neat)-

Then programs ask your name. The goal for this was to collect who is visiting the app, and then if that user visits the app back, we will say Welcome again! This makes the user more connected to the app-

And here is what console show when a user returns-

To start the program, you can ask any (although limited) question related to menstruation. There is a list of most popular 50 questions which you can ask in the Navigation section if you scroll down, here. This program was to experiment a question-answerPedia in an offline environment.

Moving on, when a question you ask is found, the texts which get returned are marked in green like shown here-

If let us say you either mistyped a question or looking queries based on a general term, the program will list all of the closely matched results like shown below. Here I have searched the general term “Period”-

Then to a cool part. This is what happens when a user input/question is extremely mistyped-

Then in this, where input mistakes are not so extreme-

The trick for something like above was to use a method known as “Fuzzy String Algorithm.” There are many string matching algorithms, but the one I am most familiar with is called the Levenshtein Distance. In a nutshell, every time you ask a question/input in the console, the algorithm I had put in would make edits to it and would match the resulted edit with a bunch of data feed I have made in the read-in files. Then it would return output in the form of a response. Pretty neat, eh?

Furthermore, there is also a built-in tool in the program which can predict the next Period if you provide the necessary information. I can’t tell you how much work I have put in this alone. I had to make an account in various women dominated forums to ask how they calculate their period, ask my mother how she keeps tracks of her menstrual cycle. I even asked my female friends, boss, and teachers about calculating the menstrual cycle.

Anyways, here is an example of that with one of the many ways to get to that tool-

The tool also notifies the user and advises if an abnormal menstrual duration is entered. You can observe that in red in the picture above.

Lastly, the program will give the user the next expected date for the period and asks if he/she would like to have that recorded in a calendar. Here are examples of that interaction-

Here is an ‘X’ marked calendar on the next expected date. And a random quote from the list of 7-10 quotes in the bottom row-

Really quick story about the quotes: they are all said by my mom over the years when she yells at ignorant people :)

It was an attempt to make something valuable, and of course, more can be done to this program. So please, if you think something can be added, feel free to enhance the program; I will greatly appreciate your effort. I have included all of the documentation and put a lot of effort into commenting the code so you won’t be lost at any point.

Thank you very much for reading!

NOTE: Thank you very much for reading! If you discover any mistakes or want to offer any feedback, please feel free to email me.