Elamur Research⌕
☰
home / papers / 2019 / Squared English Word: A Method of Generating Glyph to Use Super Characters for Sentiment Analysis

Squared English Word: A Method of Generating Glyph to Use Super Characters for Sentiment Analysis

Paper · 2019 · Baohua Sun, Lin Yang, Catherine Chi et al.

Summary

Super Characters classifies text by rendering it as an image and passing that image to a 2D-CNN. The method fits scripts such as Chinese, Japanese and Korean, where each character is already a square glyph. English is harder because a word is a run of letters of varying length. This paper introduces SEW (Squared English Word). Each word gets its own square cell, and its letters are packed into that cell in a small sub-grid sized to the word's length. The cells are then tiled row by row into one image for the whole sentence. Two extensions are added. The first is an attention variant that draws chosen words in larger cells. The second encodes structured user-profile fields as extra words in the same image, so a single CNN sees both text and tabular data. On DBpedia, SEW beats the original Super Characters by 2.1 points. On the small HappyDB set from the CL-AFF Shared Task, plain SEW helps only slightly, while profile features combined with attention give the best results. The work matters because it adapts an image-based text classifier to alphabetic languages and to mixed text-plus-table inputs.

Key points

  • DBpedia results (14 ontology classes; 40,000 training and 5,000 test items per class; 560,000 training texts in total):
    • Super Characters: 96.2%
    • SEW: 98.3%
    • Setup: SE-net-154 backbone, 14x14 = 196 word cells.
  • HappyDB / CL-AFF setup (Affective Content Analysis workshop, AAAI 2019):
    • 10,560 happy-moment sentences, split 80/20 for training and validation.
    • Two binary labels, Agency and Social.
    • Text-only SEW uses a 6x6 grid, so sentences are cut at 36 words. This truncated 1.39% of labeled sentences and 1.91% of the 170k shared-task test set.
  • Attention variant:
    • The first four words are drawn at double size in the centre of an 8x8 layout.
    • The layout is a blueprint array: 0 marks a normal cell, 1 starts an enlarged word, and -1 marks a cell to skip.
  • Profile features: age, country, marital status and gender were drawn as short tokens or initials. Parenthood was dropped after an XGBoost variable-importance analysis.
  • HappyDB accuracies (Agency / Social):
ApproachAgencySocial
Raw Super Characters85.3%82.5%
Raw Super Characters with line change85.7%83.3%
SEW-text-only85.9%83.3%
SEW-text-only-Attention-Four-words86.0%83.3%
SEW-text-only-and-Profile-Features86.3%85.6%
SEW-text-only-Attention-Profile-Features (best)86.9%85.8%

Interesting ideas

  • I1. Fixing one cell per word, with letters packed inside it, keeps word boundaries explicit and the encoding reversible, so the original sentence can be recovered from the image.
  • I2. Salience is expressed by giving chosen words more space in the input rather than through hidden weights, which makes the emphasis visible and easy to inspect.
  • I3. Structured metadata (age, country, gender) is turned into short symbolic tokens and placed alongside the text, so one model consumes both sources.
  • I4. Candidate side features were pruned first with a cheap importance analysis (XGBoost), and only the useful ones were kept.
  • I5. The truncation length was picked from the corpus length distribution (median, max, percentiles), and the share of inputs actually cut was reported.

For Mova

How these ideas could serve Mova, our small open language model — its files, stages and tests:

  • I1 (back): We could require every Mova intermediate representation to pass a similar reversibility check, confirming that the text → graph → text compressor recovers each token's identity and order.
  • I2 (frames): Prag could mark salient constituents (e.g. topic or headline-like sentence starts) with an explicit, readable prominence attribute that later steps consult openly.
  • I3 (world): Document metadata such as source, date or genre could enter the world of the text as ordinary entities and facts, so reasoning treats them like any other stated information.
  • I4 (learn): Before adding features to the perceptron parser or gparse, a quick importance pass over silver data could discard weak features and keep models smaller and easier to explain.
  • I5 (tree): gparse sequence limits could be set from treebank sentence-length percentiles, with the fraction of truncated sentences logged as part of each evaluation.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

Cite

Cite as Baohua Sun, Lin Yang, Catherine Chi, Wenhan Zhang and Michael Lin. 2019. Squared English Word: A Method of Generating Glyph to Use Super Characters for Sentiment Analysis. arXiv:1902.02160.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.1902.02160 · arXiv 1902.02160

@misc{sun2019squared,
  title = {{Squared English Word: A Method of Generating Glyph to Use Super Characters for Sentiment Analysis}},
  author = {Baohua Sun, Lin Yang, Catherine Chi, Wenhan Zhang and Michael Lin},
  year = {2019},
  doi = {10.48550/arxiv.1902.02160},
  eprint = {1902.02160},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.1902.02160}
}

References

10 references, 1 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Akari Asai, Sara Evensen, Behzad Golshan, Alon Halevy, Vivian Li, Andrei Lopatenko, Daniela Stepanov, Yoshihiko Suhara, Wang-Chiew Tan, and Yinzhan Xu. 2018. HappyDB: A Corpus of 100,000 Crowdsourced Happy Moments. In Proceedings of LREC 2018. European Language Resources Association (ELRA), Miyazaki, Japan. find
  2. Tianqi Chen and Carlos Guestrin. 2016. Xgboost: A scalable tree boosting system. In Proceedings of the 22nd acm sigkdd international conference on knowledge discovery and data mining. ACM, 785–794. ↗
  3. Digi. 2018. Speed Limit 55 MPH Sign - aluminum sign 8x12. https://www.amazon.com/Speed-Limit-55-MPH-Sign/dp/B01LA07YWU image from web search. ↗
  4. HallSigns. 2018. 6" EXTRUDED ALUMINUM STREET NAME SIGN. https://store.hallsigns.com/6-Extruded-Aluminum-Street-Name-Sign_p_3554.html image from web search. SEW: Generating Glyph for Sentiment Analysis ↗
  5. Jie Hu. 2017. SENet-154. github and model download: https://github.com/hujie-frank/SENet. ↗
  6. Kokil Jaidka and Niyati Chhaya. 2018. CL-AFF Shared TASK. https://sites.google.com/view/affcon2019/cl-aff-shared-task to be held as a part of the Affective Content Analysis workshop @ AAAI 2019. ↗
  7. Armand Joulin, Edouard Grave, Piotr Bojanowski, and Tomas Mikolov. 2016. Bag of tricks for efficient text classification. arXiv preprint arXiv:1607.01759 (2016). ↗
  8. Baohua Sun, Lin Yang, Patrick Dong, Wenhan Zhang, Jason Dong, and Charles Young. 2018. Super Characters: A Conversion from Sentiment Classification to Image Classification. EMNLP2018 workshop WASSA2018 (2018). find
  9. Xiang Zhang and Yann LeCun. 2017. Which Encoding is the Best for Text Classification in Chinese, English, Japanese and Korean? arXiv preprint arXiv:1708.02657 (2017). ↗
  10. Xiang Zhang, Junbo Zhao, and Yann LeCun. 2015. Character-level convolutional networks for text classification. In Advances in neural information processing systems. 649–657. ↗ our card

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/sun-2019-squared-english-word-method-generating/