Abstract
Often when we read some text, it leaves an impression in our mind. This perception imbibes the knowledge conveyed, the context, and the lexical information. Although there has been abundant research on the representation of text, research on devising techniques for visualization of embedded text is absent. Thus, we propose a novel “text-to-image” (TexIm) encoding enabling visualization of textual features. The proposed TexIm extracts the contextualized semantic and syntactic information present in the text through BERT and generates informed pictorial representations through a series of transformations. This unique representation is potent enough to assimilate the information conveyed, and the linguistic intricacies present in the text. Additionally, TexIm generates concise input representation that reduces the memory footprint by 37%. The proposed methodology has been evaluated on a hand-crafted dataset of Cricketer Biographies for the task of pair-wise comparison of texts. The conformity between the similarity of texts and the corresponding generated representations ascertain its fruitfulness.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
References
Chowdhary, K.R.: Natural language processing. In: Fundamentals of Artificial Intelligence, pp. 603–649. Springer, New Delhi (2020)
Ainon, R.N.: Storing text using integer codes. In: Coling 1986 Volume 1: The 11th International Conference on Computational Linguistics (1986)
Harris, Z.S.: Distributional structure. Word 10(2–3), 146–162 (1954)
Mikolov, T., Chen, K., Corrado, G., Dean, J.: Efficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781 (2013)
Mikolov, T., Sutskever, I., Chen, K., Corrado, G.S., Dean, J.: Distributed representations of words and phrases and their compositionality. In: Advances in Neural Information Processing Systems, pp. 3111–3119 (2013)
Pennington, J., Socher, R., Manning, C.: Glove: global vectors for word representation. In: Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 1532–1543 (2014)
Melamud, O., Goldberger, J., Dagan, I.: Context2vec: learning generic context embedding with bidirectional LSTM. In: Proceedings of the 20th SIGNLL Conference on Computational Natural Language Learning, pp. 51–61 (2016)
Peters, M.E., Neumann, M., Iyyer, M., Gardner, M., Clark, C., Lee, K., Zettlemoyer, L.: Deep contextualized word representations. arXiv preprint arXiv:1802.05365 (2018)
Devlin, J., Chang, M.-W., Lee, K., Toutanova, K.: Bert: pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805 (2018)
Huffman, D.A.: A method for the construction of minimum-redundancy codes. Proc. IRE 40(9), 1098–1101 (1952)
Alakuijala, J., Vandevenne, L.: Data Compression Using Zopfli. Tech. Rep, Google (2013)
Habib, A., Jahirul Islam, M., Rahman, M.S.: A dictionary-based text compression technique using quaternary code. Iran J. Comput. Sci. 3(3), 127–136 (2020)
Ziv, J., Lempel, A.: A universal algorithm for sequential data compression. IEEE Trans. Inf. Theory 23(3), 337–343 (1977)
Ziv, J., Lempel, A.: Compression of individual sequences via variable-rate coding. IEEE Trans. Inf. Theory 24(5), 530–536 (1978)
Hahn, B.: A new technique for compression and storage of data. Commun. ACM 17(8), 434–436 (1974)
Zakraoui, J., Saleh, M., Ja’am, A.: Text-to-picture tools, systems, and approaches: a survey. Multimedia Tools Appl. 78(16), 22833–22859 (2019)
Nataraj, L., Karthikeyan, S., Jacob, G., Manjunath, B.S.: Malware images: visualization and automatic classification. In: Proceedings of the 8th International Symposium on Visualization for Cyber Security, pp. 1–7 (2011)
He, K., Kim, D.-S.: Malware detection with malware images using deep learning techniques. In: 2019 18th IEEE International Conference on Trust, Security and Privacy in Computing and Communications/13th IEEE International Conference on Big Data Science and Engineering (TrustCom/BigDataSE) (2019). https://doi.org/10.1109/TrustCom/BigDataSE.2019.00022
Petrie, S.M., Julius, T.D.: Representing text as abstract images enables image classifiers to also simultaneously classify text. arXiv preprint arXiv:1908.07846 (2019)
Zhu, L., Li, W., Shi, Y., Guo, K.: SentiVec: learning sentiment-context vector via kernel optimization function for sentiment analysis. IEEE Trans. Neural Networks Learn. Syst. 32(6), 2561–2572 (2020)
Strubell, E., Ganesh, A., McCallum, A.: Energy and policy considerations for deep learning in NLP. arXiv preprint arXiv:1906.02243 (2019)
Hu, W., Tan, Y.: Black-box attacks against RNN based malware detection algorithms. In: Workshops at the Thirty-Second AAAI Conference on Artificial Intelligence (2018)
Krizhevsky, A., Sutskever, I., Hinton, G.E.: Imagenet classification with deep convolutional neural networks. In: Advances in Neural Information Processing Systems, vol. 25 (2012)
Plisson, J., Lavrac, N., Mladenic, D.: A rule based approach to word lemmatization. Proc. IS 3, 83–86 (2004)
Wu, Y., Schuster, M., Chen, Z., Le, Q.V., Norouzi, M., Macherey, W., Krikun, M., et al.: Google’s neural machine translation system: bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144 (2016)
Clark, N.R., Ma’ayan, A.: Introduction to statistical methods to analyze large data sets: principal components analysis. Sci. Signal. 4(190) (2011)
Patro, S., Sahu, K.K.: Normalization: a preprocessing stage. arXiv preprint arXiv:1503.06462 (2015)
Hore, A., Ziou, D.: Image quality metrics: PSNR versus SSIM. In: 2010 20th International Conference on Pattern Recognition, pp. 2366–2369. IEEE (2010)
Wang, Z., Bovik, A.C., Sheikh, H.R., Simoncelli, E.P.: Image quality assessment: from error visibility to structural similarity. IEEE Trans. Image Process. 13(4), 600–612 (2004)
Kusner, M., Sun, Y., Kolkin, N., Weinberger, K.: From word embeddings to document distances. In: International Conference on Machine Learning, pp. 957–966. PMLR (2015)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Ansar, W., Goswami, S., Chakrabarti, A., Chakraborty, B. (2023). TexIm: A Novel Text-to-Image Encoding Technique Using BERT. In: Tistarelli, M., Dubey, S.R., Singh, S.K., Jiang, X. (eds) Computer Vision and Machine Intelligence. Lecture Notes in Networks and Systems, vol 586. Springer, Singapore. https://doi.org/10.1007/978-981-19-7867-8_11
Download citation
DOI: https://doi.org/10.1007/978-981-19-7867-8_11
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-19-7866-1
Online ISBN: 978-981-19-7867-8
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)