Syntactic Dependency-Based N-grams as Classification Features

  • Grigori Sidorov
  • Francisco Velasquez
  • Efstathios Stamatatos
  • Alexander Gelbukh
  • Liliana Chanona-Hernández
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7630)


In this paper we introduce a concept of syntactic n-grams (sn-grams). Sn-grams differ from traditional n-grams in the manner of what elements are considered neighbors. In case of sn-grams, the neighbors are taken by following syntactic relations in syntactic trees, and not by taking the words as they appear in the text. Dependency trees fit directly into this idea, while in case of constituency trees some simple additional steps should be made. Sn-grams can be applied in any NLP task where traditional n-grams are used. We describe how sn-grams were applied to authorship attribution. SVM classifier for several profile sizes was used. We used as baseline traditional n-grams of words, POS tags and characters. Obtained results are better when applying sn-grams.


syntactic n-grams sn-grams parsing classification features syntactic paths authorship attribution 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Khalilov, M., Fonollosa, J.A.R.: N-gram-based Statistical Machine Translation versus Syntax Augmented Machine Translation: comparison and system combination. In: Proceedings of the 12th Conference of the European Chapter of the ACL, pp. 424–432 (2009)Google Scholar
  2. 2.
    Habash, N.: The Use of a Structural N-gram Language Model in Generation-Heavy Hybrid Machine Translation. In: Belz, A., Evans, R., Piwek, P. (eds.) INLG 2004. LNCS (LNAI), vol. 3123, pp. 61–69. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  3. 3.
    Agarwal, A., Biads, F., Mckeown, K.R.: Contextual Phrase-Level Polarity Analysis using Lexical Affect Scoring and Syntactic N-grams. In: Proceedings of the 12th Conference of the European Chapter of the ACL (EACL), pp. 24–32 (2009)Google Scholar
  4. 4.
    García-Hernández, R.A., Martínez Trinidad, J.F., Carrasco-Ochoa, J.A.: Finding Maximal Sequential Patterns in Text Document Collections and Single Documents. Informatica 34(1), 93–101 (2010)zbMATHGoogle Scholar
  5. 5.
    Baayen, H., Tweedie, F., Halteren, H.: Outside The Cave of Shadows: Using Syntactic Annotation to Enhance Authorship Attribution. Literary and Linguistic Computing, 121–131 (1996)Google Scholar
  6. 6.
    Stamatatos, E.: A survey of modern authorship attribution methods. Journal of the American Society for information Science and Technology 60(3), 538–556 (2009)CrossRefGoogle Scholar
  7. 7.
    Holmes, D.I.: The evolution of stylometry in humanities scholarship. Literary and Linguistic Computing 13(3), 111–117 (1998)CrossRefGoogle Scholar
  8. 8.
    Juola, P.: Authorship Attribution. Foundations and Trends in Information Retrieval 1(3), 233–334 (2006)CrossRefGoogle Scholar
  9. 9.
    Juola, P.: Ad-hoc authorship attribution competition. In: Proceedings of the Joint Conference of the Association for Computers and the Humanities and the Association for Literary and Linguistic Computing, pp. 175–176 (2004)Google Scholar
  10. 10.
    Sebastiani, F.: Machine learning in automated text categorization. ACM Computing Surveys 34(1) (2002)Google Scholar
  11. 11.
    Abbasi, A., Chen, H.: Applying authorship analysis to extremist-group web forum messages. IEEE Intelligent Systems 20(5), 67–75 (2005)CrossRefGoogle Scholar
  12. 12.
    van Halteren, H.: Author verification by linguistic profiling: An exploration of the parameter space. ACM Transactions on Speech and Language Processing 4(1), 1–17 (2007)CrossRefGoogle Scholar
  13. 13.
    Grieve, J.: Quantitative authorship attribution: An evaluation of techniques. Literary and Linguistic Computing 22(3), 251–270 (2007)CrossRefGoogle Scholar
  14. 14.
    Luyckx, K.: Scalability Issues in Authorship Attribution. Ph.D. Thesis, University of Antwerp (2010)Google Scholar
  15. 15.
    Argamon, S., Juola, P.: Overview of the international authorship identification competition at PAN-2011. In: 5th Int. Workshop on Uncovering Plagiarism, Authorship, and Social Software Misuse (2011)Google Scholar
  16. 16.
    Diederich, J., Kindermann, J., et al.: Authorship attribution with support vector machines. Applied Intelligence 19(1), 109–123 (2003)zbMATHCrossRefGoogle Scholar
  17. 17.
    Escalante, H., Solorio, T., et al.: Local histograms of character n-grams for authorship attribution. In: 49th Annual Meeting of the Association for Computational Linguistics, pp. 288–298 (2011)Google Scholar
  18. 18.
    Keselj, V., Peng, F., et al.: N-gram-based author profiles for authorship attribution. Computational Linguistics 3, 225–264 (2003)Google Scholar
  19. 19.
    Koppel, M., Schler, J., et al.: Authorship attribution in the wild. Language Resources and Evaluation 45(1), 83–94 (2011)CrossRefGoogle Scholar
  20. 20.
    Koppel, M., Schler, J., et al.: Measuring differentiability: unmasking pseudonymous authors. Journal of Machine Learning Research, 1261–1276 (2007)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Grigori Sidorov
    • 1
  • Francisco Velasquez
    • 1
  • Efstathios Stamatatos
    • 2
  • Alexander Gelbukh
    • 1
  • Liliana Chanona-Hernández
    • 3
  1. 1.Center for Computing Research (CIC)Instituto Politécnico Nacional (IPN)Mexico CityMexico
  2. 2.University of the AegeanGreece
  3. 3.ESIMEInstituto Politécnico Nacional (IPN)Mexico CityMexico

Personalised recommendations