Manga Intelligence Model

The Manga Intelligence Model (MIM) describes the basic understanding of the structure of manga. This structure is something humans would consider commonsense. For example, any human reader of manga knows such concepts as pages make up chapters that make up volumes, that sometimes a bonus chapter is included at the end of a volume, and that the first page of a chapter or volume may be a cover page. Humans don’t even have to put conscious effort towards attaining this knowledge, it is quickly and automatically learned through experience. Computers, however, don’t have the ability like humans to automatically attain knowledge of manga structure, and thus require a programmer to implement artificial intelligence.

MIM utilizes a combination of two concepts, the Manga Publication Model (MPM) and the Manga Scan Model (MSM). These concepts, used individually or in tandem, provide some interesting functionality not seen in programs lacking artificial intelligence.

Manga Publication Model

The Manga Publication Model (MPM) describes the form in which a manga series is delivered to the reader. MPM consists of two levels of hierarchy, volume and chapter. Chapter is the basic unit of manga publication. Anytime somebody is reading manga, they are reading a particular chapter. Each chapter consists of one or more pages. Chapters are generally numbered sequentially (1, 2, 3, etc.) in order of publication. Some chapters may not have a number (such as special or bonus chapters), and some chapters may have lettered naming in addition to the number (such as 1a, 1b, 1c, etc.). For simplicity we’ll denote volume 1 as v1 and chapter 1 as c1, though there are many other notations for volume and chapter such as vol and ch. Volume 1 chapter 1 can be denoted as v1_c1.

A volume, or “tankobon”, is the highest level of the hierarchy. A volume consists of multiple chapters, and, similar to chapters, they are numbered sequentially (v1, v2, v3, etc.) in order of publication. Volumes are generally released after all of the chapters contained within have already been published separately; this means the latest chapters of a series may not have a volume number because that volume does not yet exist. Special/extra/bonus chapters may appear within a volume and are typically located after all standard chapters.

Ordering within MPM is predictable. Lower numbered volumes should appear before higher numbered volumes, and lower numbered chapters should appear before higher numbered chapters. A chapter with lettered naming (such as c1a) is sorted by number first, then alphabetically by letter; for example, c1 < c1a < c1b < c2.

Manga Scan Model

The Manga Scan Model (MSM) describes what a particular digital image represents to the manga publication it was scanned from. Manga, like books, consists of sequential pages physically bound together using some form of spine (usually glue against hard paper). Each scan in MSM represents either one or two pages from the manga. If it represents two pages then those pages are either the front and back of the binding or two sequential pages within the binding.

Besides the standard numbered pages that contain the main storyline of the series, there are special types of pages in MSM. The front and back covers represent the first and last pages respectively, usually with artwork and information about the pro/preceding pages but not actual storyline content. Insert pages can appear between the front cover and the first standard page. Extra pages, usually part of an extra/special chapter, appear between the last standard page and the back cover. If the scans were provided by a scan(lation) group, a credits page attributing who helped create the scans can appear for each chapter and/or volume. The location of a credits page can vary, but MangAI prefers to place them at the end of the chapter/volume.

Ordering of scans within MSM is similar to that within MPM, but MSM has to also consider page sorting in addition to volume and chapter. The basic ordering is:

  • volume_front_cover
  • volume_insert
    • chapter_front_cover
    • chapter_insert
    • chapter_page
    • chapter_extra
    • chapter_back_cover
    • chapter_credit
  • volume_extra
  • volume_back_cover
  • volume_credit

Lettered naming for both chapters and pages is handled similar to MPM.

Conforming to the Manga Intelligence Model

By having knowledge of MPM, the user does not have to manually organize his/her manga beforehand, manually specify the order of volumes or chapters during runtime, or depend on alphabetical sort which is unreliable when dealing with scans from multiple sources or without conventional naming schemes. All the user has to do is point MangAI to parent_folder holding all the files of that series, and it will handle organizing all of your scans. You don’t even have to unzip/unrar anything, MangAI will recursively go through all of parent_folder, pick out all the chapters and volumes, and organize the output accordingly. And the only drawback… it is really hard to program :P

MSM provides a reliable, fully automatic way to sort the scans obtained from a manga publication. The user is not required to manually rearrange the ordering of pages when alphabetical sort fails. Later on this intelligence can be embedded within a manga reader and combined with MPM to allow for such features as dynamic table of contents, i.e. the ability for a reader to navigate by chapter within a volume when all chapter pages are located at the same folder level. Similar to MPM, the only drawback of MSM is that it is really hard to program.

Conforming to MIM means providing both MPM and MSM functionality. By facing this challenge, MangAI is better able to automatically interact with your digital manga collection. It’s important to note though that, like all artificial intelligence, there is no perfect implementation of MPM or MSM; instead, it is up to the programmer(s) to write the best logic possible with the resources available, then improve it as needed over time. I believe that the combination of both MPM and MSM provides a digital manga experience not possible in applications lacking manga-centric intelligence.


The following are some of the features possible when using MPM and/or MSM. This is not a complete list; some uses for manga intelligence have not been discovered yet, and others I would like to keep under my hat until they are ready.

Requirements: MPM
Binding automatically combines multiple chapters of the same volume into a single entity. This is useful as chapters may be released at different times and by different scan(lation) groups, but binding brings these scattered chapters together similar to hardcopy tankobon releases.


Using MPM, these five folders would be determined to be part of the same volume (v1) and combined into a single entity v1_c1-5. The binding will be ordered according to MPM, meaning c1 < c2 < c3 < c4 < c5.

Mixed Scan Nomenclature
Requirements: MSM
Every so often, a scan filename may be named slightly different from the other scans in that folder, throwing off string (i.e. character-by-character) sort. Since MSM compares scans by interpreted values, differences in nomenclature do not affect scan sorting.

Scans of folder Foo_v1_c1:


Can you see the problem here? Pages 1-9 were padded with a leading 0 so that string sort would work correctly with page 10 (otherwise, p10 would have been string sorted between p1 and p2). Unfortunately, page 3 was not leading zero padded. Using string sort, this would lead to Foo_v1_c1_3.jpg appearing after Foo_v1_c1_10.jpg. With MSM, filename number padding does not matter. Pages are compared by number value rather than string. In other words,


would all parse to v1_c1_p3.

In-Volume Binding
Requirements: MPM + MSM
In-volume binding combines a chapter folder of a volume into a volume folder, correctly placing that chapter within the proper order of the volume. This is best illustrated with an example.


In this example, v1_c5.5 is a bonus chapter that wasn’t included in the v1_c1-10 folder. The v1_c1-10 folder is a single entity, so normally you could only place the bonus chapter either before or after the volume. In order to place this bonus chapter correctly within v1_c1-10, MSM data must be used to precisely determine where v1_c5 scans end and v1_c6 scans begin.

Back to MangAI