Repository: abhi-kr-2100/Lingetic
Pull request #219: Add Tokens
Author: login: abhi-kr-2100
Created: 2025-04-23T16:20:49Z | Merged: 2025-04-26T07:36:30Z



<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
	- Introduced a new classification type for tokens, distinguishing between words and punctuation.
- **Bug Fixes**
	- Enforced validation to prevent creation of tokens with blank values.
- **Tests**
	- Added tests to ensure proper token creation and validation of non-blank values.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->


Diff:
diff --git a/lingetic-spring-backend/src/main/java/com/munetmo/lingetic/LanguageService/Entities/Token.java b/lingetic-spring-backend/src/main/java/com/munetmo/lingetic/LanguageService/Entities/Token.java
index aabf7e29..54493534 100644
--- a/lingetic-spring-backend/src/main/java/com/munetmo/lingetic/LanguageService/Entities/Token.java
+++ b/lingetic-spring-backend/src/main/java/com/munetmo/lingetic/LanguageService/Entities/Token.java
@@ -1,4 +1,9 @@
 package com.munetmo.lingetic.LanguageService.Entities;
 
-public class Token {
+public record Token(TokenType type, String value) {
+    public Token {
+        if (value.isBlank()) {
+            throw new IllegalArgumentException("value cannot be blank");
+        }
+    }
 }
diff --git a/lingetic-spring-backend/src/main/java/com/munetmo/lingetic/LanguageService/Entities/TokenType.java b/lingetic-spring-backend/src/main/java/com/munetmo/lingetic/LanguageService/Entities/TokenType.java
new file mode 100644
index 00000000..286e7616
--- /dev/null
+++ b/lingetic-spring-backend/src/main/java/com/munetmo/lingetic/LanguageService/Entities/TokenType.java
@@ -0,0 +1,7 @@
+package com.munetmo.lingetic.LanguageService.Entities;
+
+public enum TokenType {
+    Word,
+    Punctuation,
+    Number
+}
diff --git a/lingetic-spring-backend/src/test/java/com/munetmo/lingetic/LanguageService/Entities/TokenTest.java b/lingetic-spring-backend/src/test/java/com/munetmo/lingetic/LanguageService/Entities/TokenTest.java
new file mode 100644
index 00000000..0888fac8
--- /dev/null
+++ b/lingetic-spring-backend/src/test/java/com/munetmo/lingetic/LanguageService/Entities/TokenTest.java
@@ -0,0 +1,36 @@
+package com.munetmo.lingetic.LanguageService.Entities;
+
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+class TokenTest {
+    @Test
+    void constructorShouldCreateValidInstance() {
+        var word = new Token(TokenType.Word, "hello");
+        var punctuation = new Token(TokenType.Punctuation, "!");
+        var intNumber = new Token(TokenType.Number, "42");
+        var decimalNumber = new Token(TokenType.Number, "3.14");
+
+        assertEquals(TokenType.Word, word.type());
+        assertEquals("hello", word.value());
+
+        assertEquals(TokenType.Punctuation, punctuation.type());
+        assertEquals("!", punctuation.value());
+
+        assertEquals(TokenType.Number, intNumber.type());
+        assertEquals("42", intNumber.value());
+
+        assertEquals(TokenType.Number, decimalNumber.type());
+        assertEquals("3.14", decimalNumber.value());
+    }
+
+    @ParameterizedTest
+    @ValueSource(strings = {"", " ", "   ", "\t", "\n"})
+    void constructorShouldThrowExceptionWhenValueIsBlank(String value) {
+        assertThrows(IllegalArgumentException.class,
+            () -> new Token(TokenType.Word, value));
+    }
+}


Reviews:
user: login: gemini-code-assist[bot]
body: Hello @abhi-kr-2100, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

## Summary of Changes
This pull request introduces the concept of `Token` and `TokenType` to the `lingetic-spring-backend` project. A `Token` is now represented as a record containing a `TokenType` and a value. The `TokenType` is an enum with two possible values: `Word` and `Punctuation`. A test case is also added to ensure that the `Token` constructor throws an exception when the value is blank.

### Highlights
* **Token Entity**: Introduces a `Token` record with `type` and `value` fields.
* **TokenType Enum**: Defines a `TokenType` enum with `Word` and `Punctuation` values.
* **Validation**: Adds validation to the `Token` constructor to prevent blank values.
* **Unit Tests**: Includes unit tests to verify the `Token` constructor's behavior, including exception handling for blank values.

### Changelog
* **lingetic-spring-backend/src/main/java/com/munetmo/lingetic/LanguageService/Entities/Token.java**
  * Introduces a `Token` record to represent a token with its type and value.
  * Adds a constructor to the `Token` record that throws an `IllegalArgumentException` if the value is blank.
* **lingetic-spring-backend/src/main/java/com/munetmo/lingetic/LanguageService/Entities/TokenType.java**
  * Creates a `TokenType` enum with `Word` and `Punctuation` values.
* **lingetic-spring-backend/src/test/java/com/munetmo/lingetic/LanguageService/Entities/TokenTest.java**
  * Adds unit tests for the `Token` record.
  * Tests the constructor to ensure it creates valid instances with `Word` and `Punctuation` types.
  * Tests that the constructor throws an `IllegalArgumentException` when the value is blank, using parameterized tests.


<details>

<summary><b>Using Gemini Code Assist</b></summary>
<br>

The full guide for Gemini Code Assist can be found on our [documentation page](https://developers.google.com/gemini-code-assist/docs/review-github-code), here are some quick tips.

<b>Invoking Gemini</b>

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either `/gemini <command>` or `@gemini-code-assist <command>`. Below is a summary of the supported commands.

Feature | Command | Description
--- | --- | ---
Code Review | `/gemini review` | Performs a code review for the current pull request in its current state.
Pull Request Summary | `/gemini summary` | Provides a summary of the current pull request in its current state.
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments.
Help | `/gemini help` | Displays a list of available commands.

<b>Customization</b>

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a `.gemini/` folder in the base of the repository. Detailed instructions can be found [here](https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github).

<b>Limitations & Feedback</b>

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments to provide feedback.

</details>

<b>You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the [Gemini Code Assist IDE Extension](https://cloud.google.com/products/gemini/code-assist).</b>


[^1]: Review the [Privacy Notices](https://policies.google.com/privacy), [Generative AI Prohibited Use Policy](https://policies.google.com/terms/generative-ai/use-policy), [Terms of Service](https://policies.google.com/terms), and learn how to configure Gemini Code Assist in GitHub [here](https://developers.google.com/gemini-code-assist/docs/review-github-code). Gemini can make mistakes, so double check it and [use code with caution](https://support.google.com/legal/answer/13505487).

---

> A token's born,
> Type and value, clearly sworn,
> Blankness it defies.


state: COMMENTED
author_association: NONE
submitted_at: 2025-04-23T16:20:58Z
user: login: gemini-code-assist[bot]
body: ## Code Review
This pull request introduces the `Token` and `TokenType` entities, along with a test suite to ensure their correct behavior. The use of a record for `Token` is a good choice for its immutability and data-centric nature. The addition of a validation check in the `Token` constructor is also a positive step. Overall, the code is well-structured and the tests are comprehensive.

### Merge Readiness
The code changes are well-structured and include comprehensive tests. I am unable to directly approve the pull request, and users should have others review and approve this code before merging. However, based on my review, the pull request is ready to be merged.
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-23T16:21:09Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 3**

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: ASSERTIVE**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between daec03af668811f21a0611ab85d0d63fc789bbeb and 6557af68d1405f576a60c519eefffeb364cd2f03.

</details>

<details>
<summary>📒 Files selected for processing (3)</summary>

* `lingetic-spring-backend/src/main/java/com/munetmo/lingetic/LanguageService/Entities/Token.java` (1 hunks)
* `lingetic-spring-backend/src/main/java/com/munetmo/lingetic/LanguageService/Entities/TokenType.java` (1 hunks)
* `lingetic-spring-backend/src/test/java/com/munetmo/lingetic/LanguageService/Entities/TokenTest.java` (1 hunks)

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-23T16:22:36Z

Review comments:
diff_hunk: @@ -1,4 +1,9 @@
 package com.munetmo.lingetic.LanguageService.Entities;
 
-public class Token {
+public record Token(TokenType type, String value) {
+    public Token {
+        if (value.isBlank()) {
+            throw new IllegalArgumentException("value cannot be blank");
+        }
path: lingetic-spring-backend/src/main/java/com/munetmo/lingetic/LanguageService/Entities/Token.java
user: login: gemini-code-assist[bot]
body: ![medium](https://img.shields.io/badge/priority-medium-yellow)

Consider trimming the value before checking if it's blank to handle cases where the value consists only of whitespace. This would provide a more robust validation.

```suggestion
        if (value.trim().isBlank()) {
            throw new IllegalArgumentException("value cannot be blank");
        }
```
created_at: 2025-04-23T16:21:08Z
author_association: NONE
diff_hunk: @@ -0,0 +1,6 @@
+package com.munetmo.lingetic.LanguageService.Entities;
+
+public enum TokenType {
+    Word,
+    Punctuation
+}
path: lingetic-spring-backend/src/main/java/com/munetmo/lingetic/LanguageService/Entities/TokenType.java
user: login: coderabbitai[bot]
body: _🧹 Nitpick (assertive)_

**LGTM! Consider adding Javadoc.**

The enum definition is clear and follows Java conventions. Consider adding Javadoc comments to describe what each token type represents, which would improve code documentation and maintainability.

```diff
public enum TokenType {
+    /**
+     * Represents a word token in text.
+     */
    Word,
+    /**
+     * Represents a punctuation token in text.
+     */
    Punctuation
}
```

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-04-23T16:22:35Z
author_association: NONE
diff_hunk: @@ -1,4 +1,9 @@
 package com.munetmo.lingetic.LanguageService.Entities;
 
-public class Token {
+public record Token(TokenType type, String value) {
+    public Token {
+        if (value.isBlank()) {
+            throw new IllegalArgumentException("value cannot be blank");
+        }
+    }
path: lingetic-spring-backend/src/main/java/com/munetmo/lingetic/LanguageService/Entities/Token.java
user: login: coderabbitai[bot]
body: _🧹 Nitpick (assertive)_

**Good use of record with validation.**

Using a Java record for this immutable data is appropriate. The validation in the constructor ensures data integrity by preventing blank values.

Consider the following improvements:
1. Add null check for the `value` parameter
2. Enhance the error message to be more specific


```diff
public record Token(TokenType type, String value) {
    public Token {
+        if (value == null) {
+            throw new IllegalArgumentException("Token value cannot be null");
+        }
        if (value.isBlank()) {
-            throw new IllegalArgumentException("value cannot be blank");
+            throw new IllegalArgumentException("Token value cannot be blank");
        }
    }
}
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
public record Token(TokenType type, String value) {
    public Token {
        if (value == null) {
            throw new IllegalArgumentException("Token value cannot be null");
        }
        if (value.isBlank()) {
            throw new IllegalArgumentException("Token value cannot be blank");
        }
    }
}
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-04-23T16:22:35Z
author_association: NONE
diff_hunk: @@ -0,0 +1,28 @@
+package com.munetmo.lingetic.LanguageService.Entities;
+
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+class TokenTest {
+    @Test
+    void constructorShouldCreateValidInstance() {
+        var word = new Token(TokenType.Word, "hello");
+        var punctuation = new Token(TokenType.Punctuation, "!");
+
+        assertEquals(TokenType.Word, word.type());
+        assertEquals("hello", word.value());
+
+        assertEquals(TokenType.Punctuation, punctuation.type());
+        assertEquals("!", punctuation.value());
+    }
+    
+    @ParameterizedTest
+    @ValueSource(strings = {"", " ", "   ", "\t", "\n"})
+    void constructorShouldThrowExceptionWhenValueIsBlank(String value) {
+        assertThrows(IllegalArgumentException.class,
+            () -> new Token(TokenType.Word, value));
+    }
path: lingetic-spring-backend/src/test/java/com/munetmo/lingetic/LanguageService/Entities/TokenTest.java
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Good test coverage, add null value test.**

The tests comprehensively cover the Token record's functionality with both positive cases and validation for blank values. The parameterized test is an efficient approach to test multiple blank input scenarios.

Consider adding a test for null value handling:


```java
@Test
void constructorShouldThrowExceptionWhenValueIsNull() {
    assertThrows(IllegalArgumentException.class,
        () -> new Token(TokenType.Word, null));
}
```

This would ensure complete validation coverage and document the expected behavior when null is passed.

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-04-23T16:22:35Z
author_association: NONE

PR comments:
user: login: vercel[bot]
created_at: 2025-04-23T16:20:54Z
body: [vc]: #gCi9EJQNlayUS5AKimbhjPY7AZuYvKln1Isni6TXObw=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJsaW5nZXRpYyIsImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS9hYmhpa3IyMTAwcy1wcm9qZWN0cy9saW5nZXRpYy82VW04ZGNWcmJBZkd4OHZMNmZGUzlTVHVCYTRHIiwicHJldmlld1VybCI6ImxpbmdldGljLWdpdC0wNC0yMy1hZGR0b2tlbnMtYWJoaWtyMjEwMHMtcHJvamVjdHMudmVyY2VsLmFwcCIsIm5leHRDb21taXRTdGF0dXMiOiJERVBMT1lFRCIsImxpdmVGZWVkYmFjayI6eyJyZXNvbHZlZCI6MCwidW5yZXNvbHZlZCI6MCwidG90YWwiOjAsImxpbmsiOiJsaW5nZXRpYy1naXQtMDQtMjMtYWRkdG9rZW5zLWFiaGlrcjIxMDBzLXByb2plY3RzLnZlcmNlbC5hcHAifSwicm9vdERpcmVjdG9yeSI6ImxpbmdldGljLW5leHRqcy1mcm9udGVuZCJ9XX0=
**The latest updates on your projects**. Learn more about [Vercel for Git ↗︎](https://vercel.link/github-learn-more)

| Name | Status | Preview | Comments | Updated (UTC) |
| :--- | :----- | :------ | :------- | :------ |
| **lingetic** | ✅ Ready ([Inspect](https://vercel.com/abhikr2100s-projects/lingetic/6Um8dcVrbAfGx8vL6fFS9STuBa4G)) | [Visit Preview](https://lingetic-git-04-23-addtokens-abhikr2100s-projects.vercel.app) | 💬 [**Add feedback**](https://vercel.live/open-feedback/lingetic-git-04-23-addtokens-abhikr2100s-projects.vercel.app?via=pr-comment-feedback-link) | Apr 26, 2025 7:37am |


author_association: NONE
user: login: coderabbitai[bot]
created_at: 2025-04-23T16:20:56Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- This is an auto-generated comment: rate limited by coderabbit.ai -->

> [!WARNING]
> ## Rate limit exceeded
> 
> @abhi-kr-2100 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait **19 minutes and 48 seconds** before requesting another review.
> 
> <details>
> <summary>⌛ How to resolve this issue?</summary>
> 
> After the wait time has elapsed, a review can be triggered using the `@coderabbitai review` command as a PR comment. Alternatively, push new commits to this PR.
> 
> We recommend that you space out your commits to avoid hitting the rate limit.
> 
> </details>
> 
> 
> <details>
> <summary>🚦 How do rate limits work?</summary>
> 
> CodeRabbit enforces hourly rate limits for each developer per organization.
> 
> Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
> 
> Please see our [FAQ](https://docs.coderabbit.ai/faq) for further information.
> 
> </details>
> 
> <details>
> <summary>📥 Commits</summary>
> 
> Reviewing files that changed from the base of the PR and between 6557af68d1405f576a60c519eefffeb364cd2f03 and 2dd61671ce2c59168b95b2243ce81228fc266e41.
> 
> </details>
> 
> <details>
> <summary>📒 Files selected for processing (3)</summary>
> 
> * `lingetic-spring-backend/src/main/java/com/munetmo/lingetic/LanguageService/Entities/Token.java` (1 hunks)
> * `lingetic-spring-backend/src/main/java/com/munetmo/lingetic/LanguageService/Entities/TokenType.java` (1 hunks)
> * `lingetic-spring-backend/src/test/java/com/munetmo/lingetic/LanguageService/Entities/TokenTest.java` (1 hunks)
> 
> </details>

<!-- end of auto-generated comment: rate limited by coderabbit.ai -->
<!-- walkthrough_start -->

## Walkthrough

The changes introduce a new enum `TokenType` with values `Word` and `Punctuation` to classify tokens in the language service. The `Token` class is refactored into a Java record with two fields: `TokenType type` and `String value`, and now includes a constructor that enforces the `value` field is not blank. Additionally, a new `TokenTest` class is added to verify the correct behavior of the `Token` record, including validation logic for blank values.

## Changes

| File(s)                                                                                   | Change Summary                                                                                                             |
|------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
| .../LanguageService/Entities/TokenType.java                                              | Added new enum `TokenType` with constants `Word` and `Punctuation`.                                                       |
| .../LanguageService/Entities/Token.java                                                  | Refactored `Token` from a class to a record with fields `TokenType type` and `String value`; added validation in constructor. |
| .../LanguageService/Entities/TokenTest.java                                              | Added new test class `TokenTest` to verify correct initialization and validation logic of the `Token` record.              |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant Test as TokenTest
    participant Token as Token (record)
    participant Exception as IllegalArgumentException

    Test->>Token: new Token(type, value)
    alt value is blank
        Token-->>Exception: throw IllegalArgumentException
    else value is not blank
        Token-->>Test: Token instance created
    end
```

## Poem

> In the meadow of code, a token now hops,  
> With types Word and Punctuation, it never stops.  
> Blank values forbidden—no empty disguise,  
> The tests keep it honest, with vigilant eyes.  
> Enum and record, together they play,  
> Hopping through logic in a bright, bug-free way!  
> 🐇✨

<!-- walkthrough_end -->
<!-- internal state start -->


<!-- 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 -->

<!-- internal state end -->
<!-- finishing_touch_checkbox_start -->

<details open="true">
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=abhi-kr-2100/Lingetic&utm_content=219):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Generate unit testing code for this file.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai generate unit testing code for this file.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and generate unit testing code.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: NONE
user: login: abhi-kr-2100
created_at: 2025-04-23T16:21:04Z
body: * **#225** <a href="https://app.graphite.dev/github/pr/abhi-kr-2100/Lingetic/225?utm_source=stack-comment-icon" target="_blank"><img src="https://static.graphite.dev/graphite-32x32-black.png" alt="Graphite" width="10px" height="10px"/></a>
* **#224** <a href="https://app.graphite.dev/github/pr/abhi-kr-2100/Lingetic/224?utm_source=stack-comment-icon" target="_blank"><img src="https://static.graphite.dev/graphite-32x32-black.png" alt="Graphite" width="10px" height="10px"/></a>
* **#223** <a href="https://app.graphite.dev/github/pr/abhi-kr-2100/Lingetic/223?utm_source=stack-comment-icon" target="_blank"><img src="https://static.graphite.dev/graphite-32x32-black.png" alt="Graphite" width="10px" height="10px"/></a>
* **#222** <a href="https://app.graphite.dev/github/pr/abhi-kr-2100/Lingetic/222?utm_source=stack-comment-icon" target="_blank"><img src="https://static.graphite.dev/graphite-32x32-black.png" alt="Graphite" width="10px" height="10px"/></a>
* **#221** <a href="https://app.graphite.dev/github/pr/abhi-kr-2100/Lingetic/221?utm_source=stack-comment-icon" target="_blank"><img src="https://static.graphite.dev/graphite-32x32-black.png" alt="Graphite" width="10px" height="10px"/></a>
* **#220** <a href="https://app.graphite.dev/github/pr/abhi-kr-2100/Lingetic/220?utm_source=stack-comment-icon" target="_blank"><img src="https://static.graphite.dev/graphite-32x32-black.png" alt="Graphite" width="10px" height="10px"/></a>
* **#219** <a href="https://app.graphite.dev/github/pr/abhi-kr-2100/Lingetic/219?utm_source=stack-comment-icon" target="_blank"><img src="https://static.graphite.dev/graphite-32x32-black.png" alt="Graphite" width="10px" height="10px"/></a> 👈 <a href="https://app.graphite.dev/github/pr/abhi-kr-2100/Lingetic/219?utm_source=stack-comment-view-in-graphite" target="_blank">(View in Graphite)</a>
* **#218** <a href="https://app.graphite.dev/github/pr/abhi-kr-2100/Lingetic/218?utm_source=stack-comment-icon" target="_blank"><img src="https://static.graphite.dev/graphite-32x32-black.png" alt="Graphite" width="10px" height="10px"/></a>
* `main`


<h2></h2>

This stack of pull requests is managed by <a href="https://graphite.dev?utm-source=stack-comment"><b>Graphite</b></a>. Learn more about <a href="https://stacking.dev/?utm_source=stack-comment">stacking</a>.
<!-- Current dependencies on/for this PR: -->
author_association: OWNER
user: login: abhi-kr-2100
created_at: 2025-04-26T07:34:11Z
body: ### Merge activity

* **Apr 26, 3:34 AM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/abhi-kr-2100/Lingetic/219).
* **Apr 26, 3:35 AM EDT**: [Graphite](https://app.graphite.dev/github/pr/abhi-kr-2100/Lingetic/219) rebased this pull request as part of a merge.
* **Apr 26, 3:36 AM EDT**: @abhi-kr-2100 merged this pull request with [Graphite](https://app.graphite.dev/github/pr/abhi-kr-2100/Lingetic/219).

author_association: OWNER