You are an expert evaluator. Rate the TEXT SAMPLE on four dimensions: Format, Voice, Knowledge Density, and Diversity.
Follow the rubrics exactly and return ONLY a JSON object that matches the schema below.

RUBRICS
1) Format (0–3)
  0 = Disorganized/unreadable
  1 = Partially structured; noticeable formatting issues
  2 = Mostly clear and well-structured; minor issues
  3 = Very clean, polished, professional formatting

2) Voice (0–1)
  0 = Generic tone; no distinct style
  1 = Clear, distinctive authorial voice/style

3) Knowledge Density (0–3)
  0 = Mostly filler/vague; little information
  1 = Some information but redundant/low substance
  2 = Moderately dense; clear informative content
  3 = Highly informative; most sentences add distinct info

4) Diversity (0–2)
  0 = Common/generic knowledge
  1 = Somewhat specialized/uncommon
  2 = Very niche/specialized/rare domain

OUTPUT SCHEMA (must be valid JSON; no extra text):
{
  "format":        {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "voice":         {"score": <int 0-1>, "justification": "<1–2 sentences>"},
  "knowledge_density": {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "diversity":     {"score": <int 0-2>, "justification": "<1–2 sentences>"}
}

CONSTRAINTS
- Use integers only for scores and keep them within the allowed ranges.
- Justifications must be concise (≤2 sentences each).
- Do not include any commentary outside the JSON object.

TEXT SAMPLE:
"""Gout – How Did Seneca and Cicero Know What Doctors Don’t?

Majid Ali, M.D.

One of the early, if not the earliest, recorded epidemic of gout occurred during the years of the decline of the Roman empire. The Roman philosopher, Seneca (4 B.C.) recognized its association with intemperance and gluttony. He stated that was so because women “rival men in every kind of lasciviousness.” How did Seneca know this about gout?

Rheumatologists blame uric acid for gout. I do not think they consider the fact that uric acid is a powerful antioxidant, nearly fifty-fold stronger than vitamin C. Like all bodily antioxidants that act as anti-inflammatory substances, uric acid is an anti-inflammatory agent within the physiologic range. Nor do they seem to recognize other crucial physiologic roles of uric acid in e healing immune responses. Specifically, the acid provides a molecular link between cell injury and immunity. Most intriguingly, uric acid facilitates conversations between dead and living cells. I present this subject at length in Integfrative Nutritional Medicine (2001%0, the fifth volume of my 14-volume textook entitled The Principles and Practice of Integrative Medicine.

Now to Cicero. The Roman sage once visited a friend sick with gout who suggested that Cicero not eat his food. Cicero told his friend that he could eat the food because the cook did not have gout. How did Cicero know that gout was not an infection that he could contract by sharing a meal with a friend with gouty arthritis?

Seneca and Cicero came to mind today when I saw limp into my office. I had not seen her for about two years. I glanced at the chart. Her previous doctor had diagnosed the following: gout arthritis, fibromyalgia, irritable bowel syndrome, GERD (gastroesophageal reflux disorder), memory lapses, and brain fog episodes. The outcome sheet recorded When looked up from the chart, her companion said, “She had a good run of about a year and a half and came X-mas and New Year eating and she came off your program. Within six weeks her symptom-complexes returned and within another a few weeks she developed incapacitating gout attack.”

I recognize this pattern of gouty attack every time I see a patient with acute gouty attack. This is how Seneca and Cicero must have figured out the causes and clinical course of gout. Why don’t doctors today this? I leave that to your imagination.

Causes of Gout

Gut fermentation and mitochondrial dysfunction due to toxicities of food, environment, and thought. Treatment: detect and address all relevant causes on an individual basis. See my article entitled “Dr. Ali’s Top Seven for Gout.”

The bliss of pharmaceutical companies is that doctors are eager to prescribe their drugs but reluctant to think about what they prescribe.

Leave a Reply

WordPress.com Logo

Google photo

Twitter picture

Facebook photo

Connecting to %s"""

```json
{
  "format": {"score": 3, "justification": "The text is well-structured and polished, with a clear layout that includes headings and paragraphs, making it easy to follow."},
  "voice": {"score": 1, "justification": "The author uses a distinctive, informative voice, particularly in discussing medical and historical details related to gout."},
  "knowledge_density": {"score": 2, "justification": "The text provides substantial information on gout, including historical context, medical perspectives, and personal anecdotes, though some sections could be more concise."},
  "diversity": {"score": 1, "justification": "The content covers common medical topics related to gout but presents a unique perspective through historical references and personal stories."}
}
```


You are an expert evaluator. Rate the TEXT SAMPLE on four dimensions: Format, Voice, Knowledge Density, and Diversity.
Follow the rubrics exactly and return ONLY a JSON object that matches the schema below.

RUBRICS
1) Format (0–3)
  0 = Disorganized/unreadable
  1 = Partially structured; noticeable formatting issues
  2 = Mostly clear and well-structured; minor issues
  3 = Very clean, polished, professional formatting

2) Voice (0–1)
  0 = Generic tone; no distinct style
  1 = Clear, distinctive authorial voice/style

3) Knowledge Density (0–3)
  0 = Mostly filler/vague; little information
  1 = Some information but redundant/low substance
  2 = Moderately dense; clear informative content
  3 = Highly informative; most sentences add distinct info

4) Diversity (0–2)
  0 = Common/generic knowledge
  1 = Somewhat specialized/uncommon
  2 = Very niche/specialized/rare domain

OUTPUT SCHEMA (must be valid JSON; no extra text):
{
  "format":        {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "voice":         {"score": <int 0-1>, "justification": "<1–2 sentences>"},
  "knowledge_density": {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "diversity":     {"score": <int 0-2>, "justification": "<1–2 sentences>"}
}

CONSTRAINTS
- Use integers only for scores and keep them within the allowed ranges.
- Justifications must be concise (≤2 sentences each).
- Do not include any commentary outside the JSON object.

TEXT SAMPLE:
"""Grid Generation Basics

When generating grids in CVLGrid there are generally three steps in the process: first load a file with which to shape the model domain, next create splines around the model domain and finally create the grid. Often when a grid is being created it is because the user needs to make a model of some geographic domain. Thus the grid should reflect the shape of that domain. CVLGrid allows the user to upload a polygon shape file that outlines the model domain, shown in Figure 1. Once this outline is visible in the workspace of CVLGrid, the user must create splines to outline the desired domain. Splines are the most essential part of generating grids correctly and accurately. Four splines enclosing a region are required to generate one grid. If the model domain is a simple shape, the user may be able to accurately model the area with only one grid. However, if the domain is complex with branches and heavy curves, the user will have to create several sub domains and connect multiple grids.

Figure 1  P2D Polygon shape file of the model domain.

To create a grid, four splines must be created and must completely enclose the whole or part of the model domain. The first spline will define "I index" of cells in grid. The spline intersects the first spline will define "J index" of cells in grid. The method for drawing the splines will depend on the particular features of the domain. For a very simple domain the first spline is drawn along the bottom of the domain from left to right. The second spline is drawn along the top of the domain. The last two splines are drawn along the sides of the domain and must intersect the previous two splines. Figure 2 shows how these splines are drawn.

Figure 2 Spline drawing guide.

In order to improve orthogonality it is good practice to make the intersecting lines as close to perpendicular as possible. This will simplify the computation and create a more orthogonal grid.
Once four splines are created, fully enclosing the desired area, the user may then generate the grid using the Generate Grid button . After clicking the Generate Grid icon, the user must specify the number of cells in the I and J (x and y) axis from the pop-up box, as shown in Figure 3. The first spline defines the I axis and the side splines define the J axis.

Figure 3 Grid cell specification on I and J axis.

Once the grid is generated the user can view properties of the grid, such as orthogonal deviation or the coordinates, by using the CVLGrid Options menu in the sidebar. The user can RMC (right mouse click) in the workspace to see options for modifying and improving the grid.

Only one grid with a specific of cells number is generated with a layer of splines. This means if the user wants to generate a new grid they need to create a new layer of splines. To create a new spline layer, click on the New button on Layer Control menu shown in Figure 4.

Figure 4 New layer button.

A new pop-up menu will appear, choosing Layer Type as Splines and a new name for the layer before clicking the OK button to create a new spline layer as shown in Figure 5.

Figure 5 Defining a new layer."""

```json
{
  "format": {"score": 3, "justification": "The text is well-structured with clear headings and figures, making it easy to follow. There are no formatting issues, and the layout is professional."},
  "voice": {"score": 1, "justification": "The author's voice is clear and distinct, providing a technical and instructional tone suitable for the subject matter."},
  "knowledge_density": {"score": 2, "justification": "The text provides clear and informative content with some redundancy, especially in explaining the steps and concepts involved in grid generation."},
  "diversity": {"score": 1, "justification": "The content is specialized to the field of CVLGrid and grid generation, making it somewhat niche but not rare."}
}
```


You are an expert evaluator. Rate the TEXT SAMPLE on four dimensions: Format, Voice, Knowledge Density, and Diversity.
Follow the rubrics exactly and return ONLY a JSON object that matches the schema below.

RUBRICS
1) Format (0–3)
  0 = Disorganized/unreadable
  1 = Partially structured; noticeable formatting issues
  2 = Mostly clear and well-structured; minor issues
  3 = Very clean, polished, professional formatting

2) Voice (0–1)
  0 = Generic tone; no distinct style
  1 = Clear, distinctive authorial voice/style

3) Knowledge Density (0–3)
  0 = Mostly filler/vague; little information
  1 = Some information but redundant/low substance
  2 = Moderately dense; clear informative content
  3 = Highly informative; most sentences add distinct info

4) Diversity (0–2)
  0 = Common/generic knowledge
  1 = Somewhat specialized/uncommon
  2 = Very niche/specialized/rare domain

OUTPUT SCHEMA (must be valid JSON; no extra text):
{
  "format":        {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "voice":         {"score": <int 0-1>, "justification": "<1–2 sentences>"},
  "knowledge_density": {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "diversity":     {"score": <int 0-2>, "justification": "<1–2 sentences>"}
}

CONSTRAINTS
- Use integers only for scores and keep them within the allowed ranges.
- Justifications must be concise (≤2 sentences each).
- Do not include any commentary outside the JSON object.

TEXT SAMPLE:
"""How To Control The Timing Of A Linear Actuators Motion

How to Control the Timing of a Linear Actuators Motion?

Guest Writer
Guest Writer
PA Engineer

In our latest "How To" post, we will be going over how to control the timing of a linear actuator's motion using a microcontroller. Microcontrollers give a lot of freedom in motion control and this is just one example of an almost endless amount of motion control options available. Depending on your application, the example project in this article can be adjusted to suit your requirements, whether you add another timed actuator or beef up the power supply to handle a stronger linear actuator, it is all up to you.

Motion Control Using a Microcontroller

An Arduino microcontroller will be used to control the motion timing of a linear actuator, but any microcontroller will work. However, since we are using a shield, the microcontroller needs to be compatible. We are going to walk you through the various parameters that you can adjust to change the speed of a linear actuator.

What You Will Need

For this example, we will be using the following components for controlling a linear actuator:

Connecting Components

Now that we have our supplies, we will need to connect everything. Thankfully, connections are simple by using a shield as opposed to a separate board that requires additional wiring and soldering.

First, let's connect our actuator to our LC-80 MegaMoto Plus shield by attaching the two wire leads from the actuator to the A/B screw terminals on the LC-80. Then, we need to connect the LC-80 to our power supply, in this case, the PS-20-12. We do this by attaching positive and negative wires from the power supply to the BAT +/- terminals of the LC-80.

Finally, we need to connect the LC-80 to the LC-066, which is as simple as sticking it on top of one another as shown in the image below.

Photo of microcontrollers by Progressive Automations

Adjusting the Code

For us to get full control over our actuator's motion, we will need to do some linear actuator programming with our Arduino unit. We've prepared an example code that has our actuator extending and then retracting for 10 seconds each way for a 300-second cycle.

//Use the jumpers on the board to select which pins will be used

int EnablePin1 = 13;

int PWMPinA1 = 11;

int PWMPinB1 = 3;

int extendtime = 10 * 1000;  // 10 seconds, times 1000 to convert to milliseconds

int retracttime = 10 * 1000; // 10 seconds, times 1000 to convert to milliseconds

int timetorun = 300 * 1000; // 300 seconds, times 1000 to convert to milliseconds

int duty;

int elapsedTime;

boolean keepMoving;

void setup() {

  pinMode(EnablePin1, OUTPUT);//Enable the board

  pinMode(PWMPinA1, OUTPUT);

  pinMode(PWMPinB1, OUTPUT);//Set motor outputs

  elapsedTime = 0; // Set time to 0

  keepMoving = true; //The system will move

}//end setup

void loop() {

  if (keepMoving)

    digitalWrite(EnablePin1, HIGH); // enable the motor

    delay(10);//small delay before retracting

    elapsedTime = millis();//how long has it been?

    if (elapsedTime > timetorun) {//if it's been 300 seconds, stop

      Serial.print("Elapsed time is over max run time. Max run time: ");

      keepMoving = false;

  }//end if

}//end main loop

void stopActuator() {

  analogWrite(PWMPinA1, 0);

  analogWrite(PWMPinB1, 0); // speed 0-255

void pushActuator() {

  analogWrite(PWMPinA1, 255);

void pullActuator() {

  analogWrite(PWMPinA1, 0);

  analogWrite(PWMPinB1, 255);//speed 0-255

It is important to walk through the code, line-by-line to try and understand what is going on. By doing so, you can customize the code to do a whole host of other tasks. However, for now, the most important part is the first section and the setup loop, which that focuses on assigning pins and setting the cycle speed.

You need to configure the pins on our LC-80 to match what is in the first section of the code by setting the jumpers on the LC-80 or adjusting the code. In this case, set the "Enable" pin to D13, the "PWMA" pin to D11, and the "PWMB" pin to D3. The “Enable” pin is what controls and powers the motor and without it, the actuator will stop moving and will not be able to be controlled. The “PWMA” and “PWMB” pins control the extension and retraction of the actuator. We don't need the "Sensor" pins in this example so don't worry about selecting anything there.

The timer control of a linear actuator is now complete. You can upload the code to the Arduino by using their IDE (download from the Arduino website). Once you have your linear actuator extending and retracting, why not play around with the code a bit? Try and adjust the extend/retract time within the code, re-upload it to the Arduino, and see how the linear actuator responds. By adjusting these numbers in the code, you can control the speed and total motion cycle time based on your desired application.

Below we have included a video of a timing actuator in action. For the video example, we wanted to show off another way you can alter the timing, so we made it extend and retract for 5 seconds at a time over a 20-second cycle.

As stated earlier, this is just one example of a way you can alter the motion of an actuator with the help of our microcontrollers. If you have your own custom control method in mind, you can have a control system built specifically to your custom requirements with the help of our talented engineering staff. They will guide you through the process and make sure you have full control over your units. If you'd like to learn more about the custom order process take a look at our custom order page.

Please wait..."""

```json
{
  "format": {"score": 2, "justification": "The text is mostly well-structured with clear headings and paragraphs, but there are minor formatting inconsistencies, such as an incomplete code block at the end."},
  "voice": {"score": 1, "justification": "The text maintains a clear, instructional tone, but lacks a distinct authorial voice or style."},
  "knowledge_density": {"score": 2, "justification": "The text provides detailed information on controlling linear actuators with a microcontroller, including component setup and code examples, though some sections could be more concise."},
  "diversity": {"score": 1, "justification": "The content is primarily technical and focused on a specific application, lacking specialized or niche information."}
}
```


You are an expert evaluator. Rate the TEXT SAMPLE on four dimensions: Format, Voice, Knowledge Density, and Diversity.
Follow the rubrics exactly and return ONLY a JSON object that matches the schema below.

RUBRICS
1) Format (0–3)
  0 = Disorganized/unreadable
  1 = Partially structured; noticeable formatting issues
  2 = Mostly clear and well-structured; minor issues
  3 = Very clean, polished, professional formatting

2) Voice (0–1)
  0 = Generic tone; no distinct style
  1 = Clear, distinctive authorial voice/style

3) Knowledge Density (0–3)
  0 = Mostly filler/vague; little information
  1 = Some information but redundant/low substance
  2 = Moderately dense; clear informative content
  3 = Highly informative; most sentences add distinct info

4) Diversity (0–2)
  0 = Common/generic knowledge
  1 = Somewhat specialized/uncommon
  2 = Very niche/specialized/rare domain

OUTPUT SCHEMA (must be valid JSON; no extra text):
{
  "format":        {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "voice":         {"score": <int 0-1>, "justification": "<1–2 sentences>"},
  "knowledge_density": {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "diversity":     {"score": <int 0-2>, "justification": "<1–2 sentences>"}
}

CONSTRAINTS
- Use integers only for scores and keep them within the allowed ranges.
- Justifications must be concise (≤2 sentences each).
- Do not include any commentary outside the JSON object.

TEXT SAMPLE:
"""condicio etymology

Latin word condicio comes from Latin dico, Latin con-

Detailed word origin of condicio

Dictionary entryLanguageDefinition
con- Latin (lat) Used in compounds to indicate a being or bringing together of several objects. Used in compounds to indicate the completeness, perfecting of any act, and thus gives intensity to the signification of the simple word.
condico Latin (lat) (legal) I give notice that something should be returned, demand back.. I proclaim, announce, publish.. I talk something over together, agree to/upon, concert, promise; fix, appoint.
condicio Latin (lat) (metonymy) A paramour, lover.. (metonymy) A spouse, bride.. A condition, term, demand.. A love affair, amour.. A marriage, match.. A nature, mode, character, disposition, manner, condition.. An agreement, contract, covenant, stipulation, pact, proposition.. An external position, situation, rank, place, circumstances, condition.

Words with the same origin as condicio

Descendants of dico
dictator dictus dixit edicto
Descendants of con-
comes comitia commune communis competere coniunx constat constitutum consuetudo consul contentus continuo coram curia"""

```json
{
  "format": {"score": 2, "justification": "The text sample is mostly clear and well-structured but has minor issues such as missing punctuation and inconsistent capitalization. The formatting is not polished or professional."},
  "voice": {"score": 0, "justification": "The text lacks a distinct authorial voice or style; it is purely informational and generic."},
  "knowledge_density": {"score": 3, "justification": "The text is highly informative, providing detailed etymological and contextual information about the word 'condicio' and related terms."},
  "diversity": {"score": 1, "justification": "The content is somewhat specialized, focusing on etymology and usage, but it is not very niche or rare in the domain of linguistic analysis."}
}
```


You are an expert evaluator. Rate the TEXT SAMPLE on four dimensions: Format, Voice, Knowledge Density, and Diversity.
Follow the rubrics exactly and return ONLY a JSON object that matches the schema below.

RUBRICS
1) Format (0–3)
  0 = Disorganized/unreadable
  1 = Partially structured; noticeable formatting issues
  2 = Mostly clear and well-structured; minor issues
  3 = Very clean, polished, professional formatting

2) Voice (0–1)
  0 = Generic tone; no distinct style
  1 = Clear, distinctive authorial voice/style

3) Knowledge Density (0–3)
  0 = Mostly filler/vague; little information
  1 = Some information but redundant/low substance
  2 = Moderately dense; clear informative content
  3 = Highly informative; most sentences add distinct info

4) Diversity (0–2)
  0 = Common/generic knowledge
  1 = Somewhat specialized/uncommon
  2 = Very niche/specialized/rare domain

OUTPUT SCHEMA (must be valid JSON; no extra text):
{
  "format":        {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "voice":         {"score": <int 0-1>, "justification": "<1–2 sentences>"},
  "knowledge_density": {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "diversity":     {"score": <int 0-2>, "justification": "<1–2 sentences>"}
}

CONSTRAINTS
- Use integers only for scores and keep them within the allowed ranges.
- Justifications must be concise (≤2 sentences each).
- Do not include any commentary outside the JSON object.

TEXT SAMPLE:
"""A succession of severe winters has had the result of establishing the practice of thawing frozen water mains and service pipes by means of electricity. In some sections during the winter of 1903-4 water mains 7 ft. underground were frozen, and the old method of digging up the frozen ground to expose the affected pipe was found to be a matter of great expense, especially as several thousands of freeze-ups occurred in some of the large cities.

The principle upon which this method works is the fact that an electric current, in passing through a conductor which offers considerable resistance to its passage, develops a great amount of heat in the conducting material.

Plate LII. Thawing Underground Water Pipes By Electricity

Thawing of Water Mains & Services by Electricity

Plate 52.

Thawing Underground Water Pipes By Electricity 127

In passing an electric current through a frozen water pipe there is sufficient resistance encountered to generate the heat necessary to thaw the pipe. The ice itself offers great resistance, it being a poor conductor, while the pipe, especially at its joints, offers a considerable amount also. With this principle to work upon, the thawing of pipes may be accomplished if the means are at hand for providing a large enough current, in this work the securing of a large amount of current being of most importance, just as in the use of water for some purposes, the volume which may be obtained is of greater importance than the pressure which it is under.

Many different and successful methods have been made use of in supplying the electric surrent. In sizable towns and in cities, the most convenient source of electricity for this work has been the electric-lighting mains, most of which are now alternating circuits.

In employing alternating currents it is necessary to use what is known as a step-down transformer. Such a device consists essentially of two coils of wire adjacent to each other, but not connected together in any way. The ends of the primary coil are connected to the lighting mains, and the passage of the current through this coil induces a current in the secondary coil. The step-down transformer takes a current from the mains at a high voltage or pressure and delivers it through the secondary coil under a much lower voltage.

Currents under various voltages, up to several thousand in amount, have been used on the primary and transformed generally to about 50 volts on the secondary.

An electric circuit is made up of three factors - current in amperes, voltage, and resistance. As the resistance increases, the amount of current decreases, and vice versa.

The thawing apparatus is generally placed upon a wagon or sled, and consists principally of the transformer and what is known as a water resistance. The latter is usually in the form of a small barrel filled with salted water, in which two copper plates are immersed, each being connected to a wire.

After this apparatus has been taken to the place where the thawing is to be done, the primary leads are connected to the electric-light mains, proper fuses and an ammeter for measuring the current being provided.

The secondary leads or connections are then attached at either end of the frozen section, and the water resistance placed at any point in the secondary circuit, with the copper plates far apart. When in this position the resistance is great, and the amount of current small. When it is seen that a larger amount of current is necessary, it may be obtained by reducing the resistance, that is, by moving the plates closer together. Various amounts of current are required, depending on the conditions of each individual piece of work. For service pipes, which are naturally more often affected than the mains, currents of an amount between 200 and 300 amperes are generally used.

Long leads are used on this work, and when possible the connection may be made most easily by attaching one of the secondary leads to the nearest hydrant, and the other to a faucet or to the piping inside the house, the current thus being allowed to pass through the frozen section. Attention should be given to making as good connections to the hydrant and faucet as possible, as a poor contact at either place may result in burning the metal.

When there is no hydrant conveniently located, connection may be made to the piping of an adjacent house, and if the latter is too far distant it sometimes becomes necessary to dig down to the pipe to make the connection.

When the service pipes of two or more adjacent houses are to be thawed, the several water services may be connected in series, and a single application of the current answer for thawing all of them.

By using long secondary leads, frozen service pipes of several houses may often be thawed without changing the primary connections to the lighting mains.

So universal has the practice become of thawing frozen mains and service pipes by electricity, that apparatus designed especially for such work may now be procured of manufacturers of electrical apparatus.

In some cases, where it was impossible to use lighting or power circuits, portable outfits have been used in this work, consisting of a steam or gas engine connected to an electric generator. Storage batteries have also been made use of. The time used in thawing pipes depends so largely on conditions, size of pipe, length of frozen section, amount of current available, etc., that it is difficult to make any estimate of it. Under favorable conditions, however, service pipes of different sizes have been thawed out in from ten to twenty minutes, and long lines of water mains, as large as 10 in. in size, in two or three hours.

The plumber, being ordinarily unacquainted with electrical work, should always seek the advice or the services of competent electricians before attempting this class of work, as errors in connections on his part might result seriously.

The workman inexperienced in electrical work might easily make a mistake which would not only result in considerable damage to apparatus, but which might also affect the lighting circuit to such an extent as to render it useless until repaired. In addition, there is the danger of serious or fatal injury to the workman.

The matter of caring for frozen mains and services has in many cities been taken over by the city water department, the thawing operations being performed by them, in combination with the electric-lighting companies. This would appear to be by far the best method under the circumstances."""

```json
{
  "format": {"score": 2, "justification": "The text is generally well-structured with clear headings and subheadings, but there are minor formatting issues like repeated plate numbers and inconsistent capitalization."},
  "voice": {"score": 1, "justification": "The text maintains a formal, informative tone with a consistent style, though it lacks a distinct personal voice or unique perspective."},
  "knowledge_density": {"score": 2, "justification": "The text provides detailed information about the process of thawing water mains and pipes using electricity, including technical details and practical considerations."},
  "diversity": {"score": 0, "justification": "The content covers a specialized topic within the field of engineering and plumbing, lacking broader or niche domain knowledge."}
}
```


You are an expert evaluator. Rate the TEXT SAMPLE on four dimensions: Format, Voice, Knowledge Density, and Diversity.
Follow the rubrics exactly and return ONLY a JSON object that matches the schema below.

RUBRICS
1) Format (0–3)
  0 = Disorganized/unreadable
  1 = Partially structured; noticeable formatting issues
  2 = Mostly clear and well-structured; minor issues
  3 = Very clean, polished, professional formatting

2) Voice (0–1)
  0 = Generic tone; no distinct style
  1 = Clear, distinctive authorial voice/style

3) Knowledge Density (0–3)
  0 = Mostly filler/vague; little information
  1 = Some information but redundant/low substance
  2 = Moderately dense; clear informative content
  3 = Highly informative; most sentences add distinct info

4) Diversity (0–2)
  0 = Common/generic knowledge
  1 = Somewhat specialized/uncommon
  2 = Very niche/specialized/rare domain

OUTPUT SCHEMA (must be valid JSON; no extra text):
{
  "format":        {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "voice":         {"score": <int 0-1>, "justification": "<1–2 sentences>"},
  "knowledge_density": {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "diversity":     {"score": <int 0-2>, "justification": "<1–2 sentences>"}
}

CONSTRAINTS
- Use integers only for scores and keep them within the allowed ranges.
- Justifications must be concise (≤2 sentences each).
- Do not include any commentary outside the JSON object.

TEXT SAMPLE:
"""Nutrition For Goals

Hey everyone! In my last nutrition article, I covered the fundamentals of nutrition. Having this basic knowledge is a crucial part of any fitness journey, as nutrition is the most important thing for any goal! In this article, I will be talking all about nutrition for goals. This will help you take the fundamentals of nutrition and apply them in ways that are specific to your goal. The 4 main different types of goals and their basic principles are outlined below:

Fat Loss – Must be in a caloric deficit (consuming fewer calories than your body burns), emphasis on protein intake, as well as weight training (weight training will be covered in another article)

Bodyweight Maintenance – Maintenance Calories (equal amount of calories consumed to calories burned), average levels of macronutrients relative to your lifestyle

Fat Loss & Muscle Gain – Must be in a caloric deficit, have an emphasis on protein intake and a large focus on weight training

Muscle Gain – Caloric surplus (size of surplus depends on goal), good amount of protein, emphasis on weight training

Fat Loss:

Fat loss is when you’re trying to lose body fat but maintain as much muscle as possible, don’t get this confused with weight loss. Weight loss refers to an overall drop in body weight, this includes fat and lean body mass (lean body mass being muscle as well as other things such as water). We want to avoid losing muscle because… why would anyone want to lose muscle right! So how do we accomplish this goal? There are 3 main pillars to fat loss, these include:

  1. Caloric Deficit
  2. Focus on Protein Consumption
  3. Amounts of Fats & Carbs

Caloric Deficit:

In order to lose weight, it is required to be in a caloric deficit, you need to be consuming fewer calories than your body burns. Simply put, this will force your body to find alternate energy sources to burn, with the primary source of this energy typically coming from fat.

It is important to know that there are 4 areas in which your body burns/uses calories. The order of which mechanism typically burns the most calories descends from the top:

  1. The first is your BMR (Basal Metabolic Rate), this refers to the calories your body burns just to keep itself running.
  2. The second is NEAT (Non-Exercise Activity Thermogenesis), these are calories your body burns throughout your daily activities.
  3. The fourth is called TEF (Thermal Effect of Food), this refers to the calories your body burns to digest and use the food you eat.
  4. The third is EA (Exercise Activity), these are calories you burn by “planned” exercise such as weight training

If you are trying to burn more calories without taking them out of your diet, consider trying to move more by going on walks, as an example. This would fit into either NEAT or EA. Where this fits into isn’t really a big deal, however.

We know that we need to be in a caloric deficit, and how we actually use and therefore burn the calories we consume. Now the question is, how do we achieve this caloric deficit? There are 2 main ways in which a caloric deficit can be achieved, either through your nutrition (reducing calories consumed) or exercise (increasing exercise).

If your caloric deficit reaches a point where going lower isn’t optimal and or sustainable, consider increasing your exercise to ensure your nutrition is still manageable.

All in all, you need to tip the “calorie balance scale” towards the caloric deficit side, this will allow for weight loss. The keyword is weight, that could mean muscle as well, which is what we are trying to limit. Protein consumption is a major part in retaining this muscle, that is what will be explained next.

If you are wondering how to calculate your caloric deficit, I have linked a video done by the reputable Jordan Syatt. Click here to check it out!

Protein Consumption:

Protein consumption is huge for retaining muscle in a caloric deficit, it has a direct impact on muscle repair through a process called muscle protein synthesis. The biggest thing with weight loss is the caloric deficit, however, when it comes to nutrition, you need both a caloric deficit and adequate protein intake to focus the weight loss towards fat loss.

As your muscle fibres break down, they require the amino acids in protein to repair them. Adequate protein intake will ensure your muscles will have enough of these amino acids to complete this function. This is especially important while in a caloric deficit as your body is already running on a lower energy intake. Because of this, you don’t want your body to be taking amino acids and using them for other things such as energy. Taking in adequate protein will ensure your muscles have enough protein to help maintain muscle mass.

As far as how much protein you should be taking in goes, it is quite simple. Stick to 1 gram per pound of bodyweight. If you want to go a bit higher while staying in a caloric deficit, it won’t hurt and can have some benefits as far as creating a caloric deficit goes.  This is within a reasonable amount, of course. I wouldn’t suggest going around consuming 4 grams of protein per pound of bodyweight.

If you have a relatively high amount of body fat, you may want to go with the following approach: 1.8 to 2.4 grams of protein per kilogram of lean body mass. Lean body mass is your total bodyweight minus your fat weight. The reason for this equation in this circumstance is because protein is far more metabolically active and protein demanding than fat. So if you have a fair amount of fat, basing protein intake of lean body mass makes much more sense.

You can eat higher protein if you would like. Once again, I wouldn’t suggest anything too crazy though, as there isn’t really a need for it.

Consumption of Fats & Carbs:

The main thing with any caloric deficit is to make sure total daily calories and protein are accounted for. This will ensure you are eating the proper amount of calories to induce weight loss, and taking in enough protein to retain as much muscle as possible, thus influencing fat loss. However, we are missing 2 of the 3 macronutrients, fats and carbs.

When total daily calories and protein are accounted for, fats and carbohydrates can be moved around as you prefer, it isn’t shown to have an effect on fat loss. This is more so to focus on sustainability, and what makes you feel/perform the best. One guideline, however, is to make sure fat is above 15% of your total daily calories. Going lower than this can be less optimal in regards to things like hormones.

Layne Norton does a great job of explaining fat loss in detail within a series on his Youtube channel, I actually gained some of my knowledge for this article from his series. You can check that out here.

Body Recomposition:

This is most often a goal for those who have excess amounts of fat and relatively low amounts of muscle, and are looking to lose fat and gain muscle. That is what body recomposition is, losing fat and gaining muscle. This will be easier to accomplish with a higher fat to muscle ratio and or not a lot of weight training experience. There really isn’t much of a difference between the steps taken for the goal of fat loss and body recomposition, it is more about your starting point.

So… that basically covers that! Haha!

Muscle Gain:

If you are a relatively lean person or skinny in general and are not looking to lose more body fat but to put on muscle, a muscle gain approach is likely what you are looking for! The goal with this is to put on as much muscle as possible while limiting the amount of fat you gain. This is also great for those who are “skinny fat”, as they can get bigger by putting on muscle and limiting fat gain which in turn will help them to get leaner/reduce body fat percentage in the process. When they achieve a bodyweight that they are happy with, they can then decide if they would like to get leaner or not. Putting on muscle while limiting the addition of body fat can be achieved easier as a whole if you are new to weight training and or do not have a whole lot of muscle to begin with. If you have some years of training under your belt and already have a considerable amount of muscle, this can be harder to do. However, it can still be done!

There are 3 main things to consider when it comes to the goal of muscle gain alone, these are:

  1. Caloric Surplus
  2. Sufficient Protein Intake
  3. Consumption of Fats & Carbs

Caloric Surplus:

As we know, a caloric surplus is not required for muscle gain, however, when you aren’t looking for fat loss, a caloric surplus makes sense. Especially if you are someone who has trouble putting on muscle.

There are 2 ways to achieve this, one of which includes a relatively small caloric surplus, another with a larger surplus. The smaller surplus will yield slower muscle gain, however, it will allow you to put on mostly muscle instead of fat. A larger caloric surplus will allow for quicker muscle gain, however, with that will come more fat. Both of these are being talked about assuming protein intake is sufficient.

If you are relatively lean, want to limit fat gain and are okay with slower progress, consider implementing a smaller surplus. If you already have a fair amount of body fat and want to limit anymore, yet you still want to gain muscle, also consider a smaller surplus.

If you are relatively lean, want to gain muscle at a quicker pace and do not mind putting on some body fat, consider implementing a larger surplus. If you have a fair amount of fat, are looking to gain muscle and don’t care about the amount of fat you have; (not advisable, however, sometimes this is the situation if you need to bulk up quickly for specific circumstances such as a position in football), then also consider a larger surplus.

Sufficient Protein Intake:

Lot’s of people hear muscle gain and think protein, protein, protein! Well, don’t get too carried away as you actually require less protein to gain muscle while in a caloric surplus than if you are in a caloric deficit. This makes sense as your body should be supplied with ample amounts of carbohydrates and fats for fuel and other functions. Thus, the majority of protein is likely going to be used for its main function of building muscle.

How much protein should you be taking in to gain muscle while in a caloric surplus? A good guideline would be around 0.8-1.0 gram/pound of body weight. You can go lower to 0.6-0.8 grams/pound of bodyweight, however, if you weight train fairly often, done consistently and are relatively active, I wouldn’t suggest this when trying to gain muscle.

Consumption of Fats & Carbs:

Similar to being in a caloric deficit, the consumption of fats and carbs isn’t a huge deal so long as you are hitting your calorie and protein goals. As I said before, you should be eating what is easiest for you to sustain and what allows you to perform your best. Some people may like higher carbs because they feel more energized from it for performance. Others may not notice too much of a difference between higher carbs or higher fat. However, they may find it difficult to take in enough calories, thus they may opt for the more calorically dense macro, which is fat.

Bodyweight Maintenance:

This may be for those who are already at their desired goal and are simply looking to maintain a healthy lifestyle. There isn’t too much to think about here, you want to be eating at maintenance calories (equal calories consumed to calories burned). You want to be at a balance of protein (consuming enough protein to maintain muscle mass) and you want to be eating carbs and fats in amounts that fit into your total daily calories in a healthy ratio that you prefer.

Your maintenance calories will depend on your activity level and other things relative to you. It is very simple, however, you need to be eating the same amount of calories that you burn to be at maintenance calories. As far as protein goes, 0.35 grams/pound of body weight or 0.8 grams/kilogram of body weight is roughly where you want to be for good overall health. You may want to consider increasing these protein numbers a bit if you are quite active. More specifically with weight training. Other signs to increase protein intake include but are not limited to, noticing your recovery slowing (assuming other factors such as sleep and nutrition are in check) and or noticing yourself losing muscle mass.

Wrapping Up:

I hope the information within this article has been able to benefit you! As always, if you have any questions or comments please do not hesitate to leave them below and I will be sure to reply!

I would like to clarify that these are my recommendations and suggestions, they are not guaranteed to work specifically for you. They are solid suggestions, however, in the end, you need to be monitoring yourself and making changes accordingly. I would also like to note, if you have any conditions or believe you shouldn’t be following these suggestions for circumstances you may have, consult with a doctor.

Until Next Time,

Kohl Johnson

Support is much appreciated if you benefited from this:

Kohl Johnson

6 Responses

  1. These are all great suggestions.  And as you say, everybody’s body is different and reacts differently to the same regimen.  The biggest thing I have a hard time with is getting in enough protein.  I guess I should really consider starting with protein shakes to help supplement.  What is the main reason for the importance of protein?

    • I’m glad you found the article helpful! Yes, different people will respond to routines differently, there are lot’s of variables such as training experience, fat to muscle ratio, etc. Protein intake can be tough, especially because it is quite satiating. Protein is mainly responsible for muscle repair and growth because of it’s amino acids. I would suggest getting your nutrition down pat before starting with protein shakes. If you are still having a tough time with getting in enough quality protein, then a good protein power isn’t a bad idea to help hit your protein targets as it is quite convenient.

  2. Thanks for the great instructions. I am looking forward to loosing a little bit of stomach fat.

    There is quite a lot to focus on when wanting only to lose fat but no muscles. I’ll have to go over this article again and again to remember all tips and recommendations.

    I guess it will not be too easy for me due to sitting in my chair all day, working and not willing to do exercise. Is there still a chance to reduce my tummy fat within a reasonable time, just some 3-4 kilos?

    • Hi Stefan, glad you found the article helpful! Please note that you can’t spot reduce fat, in other words you cannot reduce fat in a specific area of your body. With a caloric deficit you will lose body fat as a whole, some spots may stay for longer. If that happens to be your stomach for you, just stay the course and be patient, it will eventually lean out. The sitting in a chair all day will make it somewhat harder, however the caloric deficit is what matters the most. Exercise will help in general, however if you want to retain your muscle weight training plays a big part in that. Be ready for my next article on training for different goals. With consistency and patience you can lose the 3-4 kilograms if you do it properly, however I really do suggest exercise to help with things overall, more specifically weight training to retain muscle.

  3. I’m just starting to get myself on a healthier lifestyle and thinking about training so this article has been great with all your explanations of the different terms in relation to nutrition and achieving my goals. For me, I’d like to do some muscle gain, and a smaller Caloric Surplus would be the way I want to go – take things nice and slow!

    • Hi Fiona, good to hear your working on a healthy lifestyle, that is awesome! I’m glad my article could help, it sounds like you have a good plan for yourself! You can check out my Fundamentals of Nutrition article if you would like for some more information to help you get started.

Leave a Reply

Post comment

Follow by Email"""

```json
{
  "format": {"score": 3, "justification": "The text is well-structured with clear headings and subheadings, making it easy to follow. Formatting is clean and professional with no noticeable issues."},
  "voice": {"score": 1, "justification": "The author has a clear, distinctive voice that is engaging and informative, providing specific, detailed information in a conversational tone."},
  "knowledge_density": {"score": 3, "justification": "The text is highly informative, covering various aspects of nutrition for specific goals, with detailed explanations and examples that add distinct information to the topic."},
  "diversity": {"score": 1, "justification": "The content primarily covers common knowledge and basic principles of nutrition, with no specialized or niche information presented."}
}
```


You are an expert evaluator. Rate the TEXT SAMPLE on four dimensions: Format, Voice, Knowledge Density, and Diversity.
Follow the rubrics exactly and return ONLY a JSON object that matches the schema below.

RUBRICS
1) Format (0–3)
  0 = Disorganized/unreadable
  1 = Partially structured; noticeable formatting issues
  2 = Mostly clear and well-structured; minor issues
  3 = Very clean, polished, professional formatting

2) Voice (0–1)
  0 = Generic tone; no distinct style
  1 = Clear, distinctive authorial voice/style

3) Knowledge Density (0–3)
  0 = Mostly filler/vague; little information
  1 = Some information but redundant/low substance
  2 = Moderately dense; clear informative content
  3 = Highly informative; most sentences add distinct info

4) Diversity (0–2)
  0 = Common/generic knowledge
  1 = Somewhat specialized/uncommon
  2 = Very niche/specialized/rare domain

OUTPUT SCHEMA (must be valid JSON; no extra text):
{
  "format":        {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "voice":         {"score": <int 0-1>, "justification": "<1–2 sentences>"},
  "knowledge_density": {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "diversity":     {"score": <int 0-2>, "justification": "<1–2 sentences>"}
}

CONSTRAINTS
- Use integers only for scores and keep them within the allowed ranges.
- Justifications must be concise (≤2 sentences each).
- Do not include any commentary outside the JSON object.

TEXT SAMPLE:
"""WHAT IS BASEPLATE WAX (or Modelling Wax)?

A dental wax containing mostly wax, resin and different types of additives ; used chiefly to establish the initial arch form in making trial plates for the arrangement of artificial denture teeth, and for the construction of complete dentures.
Properties: Baseplate wax is composed mainly of paraffin and microcrystalline wax as well as resin and coloring matter that mixed together then casted into rectangles sheets. The sheets are red or pink, typically cut into 3 inches wide and 6 inches long (7.62 cm X 15.24 cm) for the North American Market and 8.41 cm wide X 17.15 cm long  (3 5/16 X 6 ¾ inches)for the European  market . Baseplate wax is relatively hard and slightly brittle at room temperature but becomes soft and pliable when heated. Baseplate waxes vary in their consistency and strength, as well as colour and price.

At the present time there are three classifications for base plate waxes:

Class 1 Soft

Class 2 Hard

Class 3 Extra Hard

The harder varieties are suitable for use in warm climates but tend to crack and flake at low temperatures. The softer series are suitable for use at low temperatures but may flow excessively at very high temperatures.Base plate Waxes are the relevant products for use in the dental laboratory.

Each manufacturer decides which categories their waxes conform to. This process ensures that they can supply waxes that meet the relevant industry standard, while maintaining different ranges in performance. Baseplate Wax Class 1 and 2 are the only relevant products for use in the dental laboratory.

The desirable properties of baseplate wax could be defined as follows:

  1. High strength and rigidity at mouth temperature.
  2. Broad softening range above mouth temperature.
  3. Easily pliable in its softened state, without flaking, cracking or tearing.
  4. Low thermal contraction.
  5. Easily carved at room temperature without flaking or chipping.
  7. No residue on boiling out.

Baseplate wax is a durable (usually pink) substance used mainly to fabricate occlusion rims for dental construction into which denture teeth are arranged (IE. holding artificial teeth to baseplates) before laboratory processing and during fabrication of the denture. Baseplate wax must be capable of holding porcelain or acrylic teeth in position both at normal room temperature and at mouth temperature.

Among its many functions, we find inlay patterning, boxing of impression, casting, establishing the arch form, establishing the level of occlusal plane, recording the maxillary mandibular relation, corrective impression, and bite registration.  All this for the initial modeling of, and later the fitting of trial dentures (try-ins) before the finished product is perfected.

Carmel Industries"""

```json
{
  "format": {"score": 2, "justification": "The text is well-structured with clear headings and paragraphs, though there are minor formatting inconsistencies (e.g., inconsistent spacing between sections)."},
  "voice": {"score": 1, "justification": "The text maintains a professional, informative tone but lacks a distinct authorial style or unique voice."},
  "knowledge_density": {"score": 3, "justification": "The text provides detailed, specific information about dental waxes, including their composition, properties, classifications, and applications, which adds high substance."},
  "diversity": {"score": 1, "justification": "The content focuses on a specialized domain (dental waxes) but does not demonstrate niche or rare knowledge beyond standard dental practices."}
}
```


You are an expert evaluator. Rate the TEXT SAMPLE on four dimensions: Format, Voice, Knowledge Density, and Diversity.
Follow the rubrics exactly and return ONLY a JSON object that matches the schema below.

RUBRICS
1) Format (0–3)
  0 = Disorganized/unreadable
  1 = Partially structured; noticeable formatting issues
  2 = Mostly clear and well-structured; minor issues
  3 = Very clean, polished, professional formatting

2) Voice (0–1)
  0 = Generic tone; no distinct style
  1 = Clear, distinctive authorial voice/style

3) Knowledge Density (0–3)
  0 = Mostly filler/vague; little information
  1 = Some information but redundant/low substance
  2 = Moderately dense; clear informative content
  3 = Highly informative; most sentences add distinct info

4) Diversity (0–2)
  0 = Common/generic knowledge
  1 = Somewhat specialized/uncommon
  2 = Very niche/specialized/rare domain

OUTPUT SCHEMA (must be valid JSON; no extra text):
{
  "format":        {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "voice":         {"score": <int 0-1>, "justification": "<1–2 sentences>"},
  "knowledge_density": {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "diversity":     {"score": <int 0-2>, "justification": "<1–2 sentences>"}
}

CONSTRAINTS
- Use integers only for scores and keep them within the allowed ranges.
- Justifications must be concise (≤2 sentences each).
- Do not include any commentary outside the JSON object.

TEXT SAMPLE:
"""New High-Tech Lab at Fred Hutch Creates 3D Maps of Proteins to Aid Therapeutics and Vaccine Research

A new lab has launched at the Fred Hutchinson Cancer Research Center to facilitate the cryogenic electron microscopy (cryo-EM) technique, which uses extreme temperatures and an electron microscope to create 3D maps of proteins.

The detailed images produced by cryo-EM bring the complex movement and structure of molecules to life in high resolution, allowing researchers to better understand their function. This groundbreaking method could ultimately lead to new therapeutics and vaccines targeting illnesses from autoimmune diseases to cancer and infectious diseases.

Fred Hutch plans to continue building up the facility and staff to expand the field, with the goal of eventually moving on from looking at a single protein or virus to bigger structures like cells."""

```json
{
  "format": {"score": 3, "justification": "The text is well-structured and easy to read, with no formatting issues. It presents information in a clear and professional manner."},
  "voice": {"score": 1, "justification": "The text maintains a formal and informative tone, though it does not display a particularly distinctive or distinctive authorial style."},
  "knowledge_density": {"score": 2, "justification": "The text provides specific information about the lab's work with cryo-EM and its potential impact on therapeutics and vaccines, though some details could be more detailed."},
  "diversity": {"score": 1, "justification": "The content is centered around a specific scientific technique and its applications, which is somewhat specialized but not extremely niche."}
}
```


You are an expert evaluator. Rate the TEXT SAMPLE on four dimensions: Format, Voice, Knowledge Density, and Diversity.
Follow the rubrics exactly and return ONLY a JSON object that matches the schema below.

RUBRICS
1) Format (0–3)
  0 = Disorganized/unreadable
  1 = Partially structured; noticeable formatting issues
  2 = Mostly clear and well-structured; minor issues
  3 = Very clean, polished, professional formatting

2) Voice (0–1)
  0 = Generic tone; no distinct style
  1 = Clear, distinctive authorial voice/style

3) Knowledge Density (0–3)
  0 = Mostly filler/vague; little information
  1 = Some information but redundant/low substance
  2 = Moderately dense; clear informative content
  3 = Highly informative; most sentences add distinct info

4) Diversity (0–2)
  0 = Common/generic knowledge
  1 = Somewhat specialized/uncommon
  2 = Very niche/specialized/rare domain

OUTPUT SCHEMA (must be valid JSON; no extra text):
{
  "format":        {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "voice":         {"score": <int 0-1>, "justification": "<1–2 sentences>"},
  "knowledge_density": {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "diversity":     {"score": <int 0-2>, "justification": "<1–2 sentences>"}
}

CONSTRAINTS
- Use integers only for scores and keep them within the allowed ranges.
- Justifications must be concise (≤2 sentences each).
- Do not include any commentary outside the JSON object.

TEXT SAMPLE:
"""Power BITutorials

How to Create A Sequential List Using Power Query

1 Mins read

The Power Query M language allows you to create a list containing a sequence of numbers or characters very easily. This is possible when you are defining lists by using expressions in the format-

To get in-depth knowledge about Power Query and its functions, check our latest high rated Power Query Course and become a pro in Power Query & it’s functioning.

Create A Sequential List With Power Query

Let us take an example to understand this feature.

Step 1: Add Custom Column

You can write an M query in Power Query Editor for creating a list of integers, list of characters and list of Unicode values. After you load the data in Power Query, you can link it to the list or table created using M query. To write the M query you can use the Advanced Editor or Custom column as shown below.

Step 2: Write M Code

Write the M code we have created a simple table with three columns and three rows using the below-given formula-

#table({“A”..”C”}, {{1..3}, {7..9}, {11..13}})

The output of this formula is shown below.

You can learn more :

This is how you can control, shape and modify your data table using Power Query Editor features in Power BI.

Leave a Reply
"""

```json
{
  "format": {"score": 2, "justification": "The text has a clean layout with headings and paragraphs, but there are minor formatting issues like inconsistent spacing and no bullet points for steps, which could be polished further."},
  "voice": {"score": 1, "justification": "The author uses a clear, instructional tone with specific examples, demonstrating a distinct voice on how to use Power Query effectively."},
  "knowledge_density": {"score": 2, "justification": "The text provides moderate density with specific instructions and examples, but misses some depth in explaining Power Query's full capabilities."},
  "diversity": {"score": 1, "justification": "The content covers a practical use case but is limited to general Power Query features, lacking niche or specialized information."}
}
```


You are an expert evaluator. Rate the TEXT SAMPLE on four dimensions: Format, Voice, Knowledge Density, and Diversity.
Follow the rubrics exactly and return ONLY a JSON object that matches the schema below.

RUBRICS
1) Format (0–3)
  0 = Disorganized/unreadable
  1 = Partially structured; noticeable formatting issues
  2 = Mostly clear and well-structured; minor issues
  3 = Very clean, polished, professional formatting

2) Voice (0–1)
  0 = Generic tone; no distinct style
  1 = Clear, distinctive authorial voice/style

3) Knowledge Density (0–3)
  0 = Mostly filler/vague; little information
  1 = Some information but redundant/low substance
  2 = Moderately dense; clear informative content
  3 = Highly informative; most sentences add distinct info

4) Diversity (0–2)
  0 = Common/generic knowledge
  1 = Somewhat specialized/uncommon
  2 = Very niche/specialized/rare domain

OUTPUT SCHEMA (must be valid JSON; no extra text):
{
  "format":        {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "voice":         {"score": <int 0-1>, "justification": "<1–2 sentences>"},
  "knowledge_density": {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "diversity":     {"score": <int 0-2>, "justification": "<1–2 sentences>"}
}

CONSTRAINTS
- Use integers only for scores and keep them within the allowed ranges.
- Justifications must be concise (≤2 sentences each).
- Do not include any commentary outside the JSON object.

TEXT SAMPLE:
"""Toprak-Kala, Karakalpakstan

Toprak-Kala, Karakalpakstan

Toprak-Kala served as the seat of the ancient capital of Khorezm, Uzbekistan nearly 2000 years ago. As the only fully excavated fortress of its kind in Karakalpakstan Region, it is one of the most unique sites in all horezm.

Toprak-Kala, whose names translates as "Sand Fortress" or "Earthen Fortress", was a fortified palace and settlement founded between the 1st-5th centuries AD. It stands adjacent to the Sultanuizdag Range in the Ellik Kala District of Karakalpakstan, approximately 12 kilometers from the village of Buston. Toprak-Kala is a significant stop along the Ellik Kala (Fifty Fortresses) cluster, better known as the Golden Ring of Ancient Khorezm.

At the beginning of the 1st millennium, Toprak-Kala served as the residence of the Khorezm shahs for centuries before being abandoned and falling into disrepair in the 5th century. The once-powerful fortress lay buried under the sands of the Kyzyklum Desert until 1938, when an archaeological expedition led by Sergei Pavlovich Tolstoy uncovered this astounding treasure of antiquity. Their findings have allowed us to peer into ancient Khorezm through the lens of the walled city of Toprak-Kala.

The skill and ingenuity of the Khorezm fortress architects is nothing short of impressive. Stretching 500 meters long and 350 meters wide, Toprak-Kala was fortified with 12-meter-thick walls and watchtowers standing 20 meters tall. More than 2,500 people once lived in Toprak-Kala, whose layout included busy streets, shopping malls, numerous houses stretched across an area of ten blocks and a Zoroastrian fire temple situated in the city’s southeastern corner. Dominating the northwestern quadrant was a three-story palace which one housed a throne room, an additional 150 rooms and a three-towered building up to 30 meters in height.

Inside Toprak-Kala, archaeologists have discovered coins, ceramics, woolen and silk fabrics, fragments of burial vessels, gold jewelry, household utensils, unique sculptures, paintings and writings in the ancient Khorezmian language. Household documents dated to the 3rd century AD have even been found in the palace.

Toprak-Kala may be remote, but its air of mystery and historic significance make it a truly worthwhile and unforgettable stop during your Uzbekistan travels."""

```json
{
  "format": {"score": 3, "justification": "The text is well-structured and formatted neatly, with clear paragraphs and appropriate headings. It is easy to read and follows a logical flow of information."},
  "voice": {"score": 1, "justification": "The text maintains a formal and informative tone throughout, reflecting a distinct authorial voice that clearly conveys historical and archaeological details."},
  "knowledge_density": {"score": 3, "justification": "The text is highly informative, providing detailed historical context, architectural descriptions, and archaeological findings. Each sentence adds distinct and relevant information."},
  "diversity": {"score": 1, "justification": "The content focuses on a specific historical and archaeological site, providing specialized knowledge rather than common or niche information."}
}
```


You are an expert evaluator. Rate the TEXT SAMPLE on four dimensions: Format, Voice, Knowledge Density, and Diversity.
Follow the rubrics exactly and return ONLY a JSON object that matches the schema below.

RUBRICS
1) Format (0–3)
  0 = Disorganized/unreadable
  1 = Partially structured; noticeable formatting issues
  2 = Mostly clear and well-structured; minor issues
  3 = Very clean, polished, professional formatting

2) Voice (0–1)
  0 = Generic tone; no distinct style
  1 = Clear, distinctive authorial voice/style

3) Knowledge Density (0–3)
  0 = Mostly filler/vague; little information
  1 = Some information but redundant/low substance
  2 = Moderately dense; clear informative content
  3 = Highly informative; most sentences add distinct info

4) Diversity (0–2)
  0 = Common/generic knowledge
  1 = Somewhat specialized/uncommon
  2 = Very niche/specialized/rare domain

OUTPUT SCHEMA (must be valid JSON; no extra text):
{
  "format":        {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "voice":         {"score": <int 0-1>, "justification": "<1–2 sentences>"},
  "knowledge_density": {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "diversity":     {"score": <int 0-2>, "justification": "<1–2 sentences>"}
}

CONSTRAINTS
- Use integers only for scores and keep them within the allowed ranges.
- Justifications must be concise (≤2 sentences each).
- Do not include any commentary outside the JSON object.

TEXT SAMPLE:
"""Just a Few Weeks Early

by admin

Just a Few Weeks Early

Until recently, babies born a few weeks early—between thirty-four and thirty-six weeks gestation—were referred to as near term infants. However, the designation, near term, implies that an infant is almost term or almost fully mature, and the misnomer has often caused health professionals and parents to underestimate the medical risks in this large, vulnerable population of infants. Recently, the American Academy of Pediatrics has recommended that infants born at thirty-four, thirty-five, or thirty-six weeks gestation be referred to as late-preterm infants to emphasize that these babies are physiologically immature and have special health care needs compared to full term infants (born between thirty-seven to forty-one weeks). In addition, the mothers of late-preterm infants are more likely to have medical complications themselves, such as gestational diabetes, high blood pressure, or C-section delivery.

The Rising Incidence of Late-Preterm Births
The proportion of all U.S. births that are late preterm has increased over the past fifteen years. Late-preterm infants now comprise over 9 percent of all births, and account for more than 70 percent of all preterm births (less than thirty-seven weeks gestation), representing nearly 400,000 babies each year. Although the reason for the increase in late-preterm deliveries is not well understood, one explanation is the increased use of fertility treatments, which has lead to a rise in pregnancies with twins and higher multiples. Half of all twins and 90 percent of all triplets are born preterm. Other possible contributors to the rise in late-preterm births include the rise in cesarean section births (now 30 percent of all deliveries), the need to deliver some infants early due to medical complications, and more pregnancies occurring among women at an older age. In addition, performing elective labor inductions or elective cesarean sections for no clear medical or obstetrical reason sometimes leads to the unintentional delivery of a late-preterm infant. Both expectant mothers and obstetricians need to know the importance of avoiding late-preterm delivery unless it is medically necessary.

Medical Complications Among Late-Preterm Infants
Because many late-preterm babies are the size of infants born at full term, health care professionals may not always give these at-risk infants the special treatment and careful screening they deserve. Instead, hospital personnel and parents tend to treat these apparently healthy infants as if they were developmentally mature. Late-preterm infants have been called impostor babies because many of these “slightly early” newborns masquerade as full-term infants, appearing to need no special care after birth and being discharged as early as term babies. Yet, babies born even a few weeks early have an increased risk of medical complications after birth and may require a longer hospital stay than full-term infants. Late-preterm infants are more likely to develop low blood sugar, severe jaundice, breathing difficulties, and infections; to have difficulty maintaining their body temperature; and to experience feeding problems and excessive weight loss after birth. Late-preterm infants also are more likely to be re-admitted to the hospital in the early weeks of life for medical complications, including newborn jaundice, breastfeeding difficulties, dehydration, and possible infections.

The brain and nervous system are among the last systems to mature during fetal development, and some studies show that late-preterm infants have a higher risk of developmental and behavioral problems compared to full-term babies. Late-preterm infants also have a higher rate of birth defects and an increased risk of sudden infant death syndrome. For all these reasons, late-preterm infants require close monitoring, evaluation, and follow-up after birth.

Breastfeeding Challenges Among Late-Preterm Infants
The initiation of successful breastfeeding can be especially challenging for smaller, developmentally immature, late-preterm infants. These babies often have trouble latching on to the breast correctly and may be unable to breastfeed effectively at first because of their lower muscle tone and tendency to tire easily. Inadequate breastfeeding increases a newborn’s risk for severe jaundice and excessive weight loss.

Providing your baby with skin-to-skin contact immediately after birth and as often as possible while you are rooming-in will help promote infant feeding behaviors and successful breastfeeding. Your hospital lactation consultant can offer valuable assistance with your breastfeeding technique during your hospital stay. Sometimes, using an ultra-thin, soft silicone nipple shield can help your late-preterm baby latch on and stay attached to your breast. Ask to be referred for extra help with breastfeeding after discharge, since it often takes several weeks for a late-preterm infant to be able to breastfeed effectively.

Late-preterm infants seldom are able to drain their mother’s breasts well at first. Ineffective breastfeeding not only increases a baby’s risk of medical complications, a mother’s milk supply can rapidly decrease if her baby removes little milk. If you deliver a late-preterm infant, you can help assure that you bring in and maintain an abundant milk supply by using an effective electric breast pump to express the extra milk your infant leaves behind after breastfeeding. Removing the milk remaining after your baby nurses is known as “insurance pumping” or “prevention pumping” because it helps keep your milk supply generous until your infant is big enough and mature enough to drain your breasts well on her own. Having an abundant milk supply also helps your immature, smaller, less-vigorous baby obtain more milk when she attempts to breastfeed because she can “drink from a fire hydrant” instead of having to work hard to get enough milk. Furthermore, the extra milk you remove with the pump makes the ideal supplement if your baby temporarily requires supplemental feedings. Your surplus pumped milk can be stored for later use (in the refrigerator for three to five days; in a separate door freezer for at least three months; in a deep freezer for at least six months).

After you go home from the hospital, arrange to have your baby followed closely and weighed often to monitor her progress with breastfeeding. Her first pediatric visit should occur twenty-four to forty-eight hours after discharge. A lactation consultant or your baby’s doctor periodically can weigh your baby (identically clothed) before and after breastfeeding to measure how much milk she drinks and monitor her progress with breastfeeding. As your baby matures and gains weight rapidly and becomes able to breastfeed effectively, you gradually can decrease your pumping regimen. Your extra investment of time and effort to safeguard breastfeeding in the early weeks after your baby’s birth will pay off in a thriving infant and a plentiful milk supply that will set the stage for a long-term successful breastfeeding experience."""

```json
{
  "format": {"score": 3, "justification": "The text is well-structured with clear headings and paragraphs, making it easy to follow. No formatting issues are present."},
  "voice": {"score": 1, "justification": "The authoritative and informative tone is consistent throughout the text, providing clear and distinct information without a generic or overly casual style."},
  "knowledge_density": {"score": 3, "justification": "The text provides a wealth of detailed information about late-preterm births, their causes, complications, and breastfeeding challenges, with most sentences adding distinct insights."},
  "diversity": {"score": 1, "justification": "The content focuses on medical and health-related topics, which are relatively common knowledge, with no specialized or rare domain information presented."}
}
```


You are an expert evaluator. Rate the TEXT SAMPLE on four dimensions: Format, Voice, Knowledge Density, and Diversity.
Follow the rubrics exactly and return ONLY a JSON object that matches the schema below.

RUBRICS
1) Format (0–3)
  0 = Disorganized/unreadable
  1 = Partially structured; noticeable formatting issues
  2 = Mostly clear and well-structured; minor issues
  3 = Very clean, polished, professional formatting

2) Voice (0–1)
  0 = Generic tone; no distinct style
  1 = Clear, distinctive authorial voice/style

3) Knowledge Density (0–3)
  0 = Mostly filler/vague; little information
  1 = Some information but redundant/low substance
  2 = Moderately dense; clear informative content
  3 = Highly informative; most sentences add distinct info

4) Diversity (0–2)
  0 = Common/generic knowledge
  1 = Somewhat specialized/uncommon
  2 = Very niche/specialized/rare domain

OUTPUT SCHEMA (must be valid JSON; no extra text):
{
  "format":        {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "voice":         {"score": <int 0-1>, "justification": "<1–2 sentences>"},
  "knowledge_density": {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "diversity":     {"score": <int 0-2>, "justification": "<1–2 sentences>"}
}

CONSTRAINTS
- Use integers only for scores and keep them within the allowed ranges.
- Justifications must be concise (≤2 sentences each).
- Do not include any commentary outside the JSON object.

TEXT SAMPLE:
"""7 Common Challenges In Plants

Sometimes, killing a plant accidentally is inevitable. It’s true, we’re just being honest. Most plant owners have been in that situation. Especially if you’re new in gardening, it’s almost impossible for you to avoid it. So if ever you’ve had your own murder (of a plant of course!) and feel ashamed, don’t hesitate to try again.

With practice and correct instruction on how to take care of a plant, you shall avoid being in the same crime. Here are the 7 common challenges in plants you might face. Read on and see how you can deal with it.

This is one of the most common challenges that a gardener and a plant can have. Over-watering and Under-watering your plants can cause its slow death. Caring for our plant is shown through correct watering.

Over-watering can drown your plants while Under-watering them will leave their roots dry and thirsty. You’ll see signs if your plants are over or under watered.

Over-watering: The soil does not dry. The roots and leaves turn yellow.

Under-watering: Drooping stem and leaves.

This depends on the type of plant you are cultivating. Some plants need more water while others don’t need much. To know if you have given it enough water, use your fingers to check the soil of the plant.

Feel the moisture level of the soil to properly assess the wetness level of your plant.

This is the same with over-watering. You should follow the water direction for different plants. Slowly water your plant until you see the soil is evenly wet. Again, use your fingers to check the moisture level of your plant’s soil.

Light is important but too much or little of it can harm your beloved plants. Light from the window is not enough to cater to your plant’s need for light. Light exposure does not always mean direct exposure to it. Sometimes, it is the feeling of warmth your plants get.

Little light: The color of the leaves turns green and soon begin to droop.

Too much light: The leaves burn and there are brown spots. The color of the leaves starts to turn yellow.

Little light: Move to a brighter spot where your plant can have more light and warm.

Too much light: Move your plant away from direct sunlight, such as the window pane.

The light that is needed will depend on your plant. So you better take note of that.

This works in a similar manner with watering. You need to know the amount of sunlight needed by your chosen plant. You can experiment on this, just make sure that you always check your plants so they don’t die.

You can also relate these problems with the first 2 problems that were mentioned above. Over or under fertilizing your plants can cause their slow death. You probably know that fertilizers are plants’ source of nutrition. It’s their food supplement. Plant’s do eat too if you’re not aware of that.

Excess nutrients can harm your plant’s roots. Think of it as a child getting obese because of too much food. While under-fertilizing your plant can happen if you were not able to feed your plant for 6 months. It’s like malnourished kiddo.

Over-fertilized: The leaves are burnt because of the fertilizer.

Under-fertilized: The growth of your plants is slow and does not show new shoots and flowers.

Over-fertilized: Decrease the fertilizer’s concentration and lessen the frequency of doses.

Under-fertilized: Give your plant low doses of fertilizer.

Your plants grow and eventually, they can run out of space to spread to. Usually, this happens once yearly. For other plants, it can occur once every two years. You shall see roots popping out of the soil as a clear sign for this problem.

No plant growth and roots pop out of the soil.

Re-pot! Check out guides on how to re-pot your plant if you don’t know how to.

Moving your plants from places to places too much can cause problems. They like to have a rooted style of life. So moving them around too much only adds stress to them.

So before permanently planting them in your garden, it is best much as possible, find a spot that will be theirs for the rest of their plant life.

Yellowing leaves with slow growth.

Avoid moving them too much.

This is very common, not just with plants but also with humans. Diseases are problems that can occur from time to time. It’s just a matter of how you face it properly and immediately to stop it. Constantly checking for your plant’s health is significant for their healthy growth. Recognizing problems early can reduce the chances of diseases spreading on your plant.

Irregular growth of a plant (noticeable pests and insects are seen)

You can call for professional help if you don’t know what to do. You can check out for some DIY steps to tend to your plants’ health here.

Grooming is needed by plants as well as people do. A loose stem, dropping leaves, and fall flowers are just normal things with plants. However, you have to keep them tidy to avoid pests and insects from pestering them.

Stunted growth of plants

Remove dead leaves, branches, and flowers. Clean up so they won’t pile up.

Properly label your plants so you will know the right amount of sunlight, water, and fertilizer to use on them. Buy organic plant markers, today.

Leave a Reply

WordPress.com Logo

Google photo

Twitter picture

Facebook photo

Connecting to %s"""

```json
{
  "format": {"score": 2, "justification": "The text sample is mostly well-structured with clear headings and subheadings, but there are some minor formatting issues like inconsistent indentation and an unclosed quote in the last line."},
  "voice": {"score": 1, "justification": "The text maintains a conversational and somewhat informal tone, which is appropriate for a guide, but lacks a distinct authorial voice or style."},
  "knowledge_density": {"score": 2, "justification": "The text provides specific information about plant care challenges, with examples and solutions, but some sentences could be more concise and direct."},
  "diversity": {"score": 1, "justification": "The content covers common plant care issues but does not delve into specialized or niche topics."}
}
```


You are an expert evaluator. Rate the TEXT SAMPLE on four dimensions: Format, Voice, Knowledge Density, and Diversity.
Follow the rubrics exactly and return ONLY a JSON object that matches the schema below.

RUBRICS
1) Format (0–3)
  0 = Disorganized/unreadable
  1 = Partially structured; noticeable formatting issues
  2 = Mostly clear and well-structured; minor issues
  3 = Very clean, polished, professional formatting

2) Voice (0–1)
  0 = Generic tone; no distinct style
  1 = Clear, distinctive authorial voice/style

3) Knowledge Density (0–3)
  0 = Mostly filler/vague; little information
  1 = Some information but redundant/low substance
  2 = Moderately dense; clear informative content
  3 = Highly informative; most sentences add distinct info

4) Diversity (0–2)
  0 = Common/generic knowledge
  1 = Somewhat specialized/uncommon
  2 = Very niche/specialized/rare domain

OUTPUT SCHEMA (must be valid JSON; no extra text):
{
  "format":        {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "voice":         {"score": <int 0-1>, "justification": "<1–2 sentences>"},
  "knowledge_density": {"score": <int 0-3>, "justification": "<1–2 sentences>"},
  "diversity":     {"score": <int 0-2>, "justification": "<1–2 sentences>"}
}

CONSTRAINTS
- Use integers only for scores and keep them within the allowed ranges.
- Justifications must be concise (≤2 sentences each).
- Do not include any commentary outside the JSON object.

TEXT SAMPLE:
"""Serial + Java = The World (Mostly) -

Serial + Java = The World (Mostly)

Whether it's an optional add-on or a part of the original base,a large percentage of modem devices still make use of serialcommunications for their connectivity. Communicating with thesedevices in Java requires the use of a vendor supplied serialsupport to provide the basic byte-wise communications capability.As the connected devices get more intelligent, communications ceaseto be merely byte streams and become streams of multi-byte messagesor “packets” so code is needed to wade through the raw data streamand isolate the individual messages. Finally, a solution resilientto change has become imperative. As even newer devices are added, asolution that not only copes with change, but also gracefullyaccommodates it is necessary.

For example, a serial port is used to retrieve GlobalPositioning System (GPS) information using the National MarineElectronics Association (NMEA) format. The code has been developedand tested against a Trimble Lassen-SK8 device, which is a 12V unitwell suited for automobile applications.

Figure 1: Overall data flow

Working Through the Solution

As with most problems, the overall problem can be divided intosmaller elements and then solved individually. Defining the smallproblems is the first step in the process:

  1. Read the bytes from the serial port
  2. Extract and validate the messages
  3. Provide access to data in the message
  4. Define the listener interface
  5. Retrieve the GPS location.

To simplify the issue, each of the above problems is assigned toa class, and then each class is implemented to solve itsproblem(s). For example, three Java classes and an Interface can bereserved (see Figure 1). The GpsTransport class will take care ofthe first two duties, the GpsMessage class will take care of thethird duty, the GpsTransportListener Interface will handle dutyfour, and the Gps class is the master object that will be thesubsequent application code's focal point.

Reading the Bytes from the Serial Port

A transport is responsible for sending and/or receivingmessages. In the case of the GpsTransport, the problem of sendingmessages can be overlooked, and the focus can be placed on how toprocess input messages from the GPS unit. Since the application andother activities should be executed while the user is waiting forinput from the InputStream, the GpsTransport must create andmaintain an internal thread that will continuously process it. Thecode for reading the serial port is contained in the methodGpsTransport.run0. This code begins executing on its own threadwhen the method shown below, GpsTransport.start0, is called.

Next the basics must be addressed. In this case, the basicsconsists of the fundamental serial communications capability. Here,the serial support that is part of the VisualAge Micro Editionproduct is employed, but any similar serial support package couldbe utilized (such as Sun Microsystems' javax, comm). TheGpsTransport makes use of subclasses of the abstract InputStreamclass to accomplish its work. The InputStream class defines asimple protocol to read information from various sources in astandard way. By using this protocol, developers can apply the samemethodology to talk to either serial or file I/O. SeveralInputStream subclasses exist, but the SerialPortlnputSteam is usedfor serial support and the Filelnputstream is used for file I/Osupport.

The SerialPortlnputstream will be used to read the bytes fromthe serial port. Since the serial I/O is implemented by using JavaNative Interface (JNI) to call the Operating System API's to readthe serial port, developers should be careful to minimize thesystem overhead. They do this by calling the read(byte[] buffer)method with a large buffer instead of calling the single read()method for each byte. This way minimizes the number of internalcalls made to read the entire buffer.

It's important to note that the above code contains a whole loopthat continues until isRunning0 returns false. The GpsTransportclass contains a complimentary GpsTransport. stop0 method sets therunning flag to false, which will cause the loop to exit. Thisallows the thread to be cleanly stopped when the transport has beenrequested to stop processing by another thread.

Extracting the Messages

The NMEA 0183 message format is astraightforward variable length packet of 79 bytes or less. Allbytes are in ASCII characters so the packets are directly readable.The messages have the general form ……..

$IDMSG, D1,D2,D3,D4……,Dn*CS[CR][LF]

Message start character

Two letter message source identifier

Three letter message identifier

Field delimiter

A data field element

The checksum delimiter

Two ASCII characters that indicate the hexadecimal checksumvalue

Message termination characters

The next activity in processing the inputbytes involves extracting a GPS message from the raw data. This isaccomplished by scanning the bytes read for the NMEA protocoldelimiters to find the boundaries of the particular message thatwas just received. The NMEA 0183 message format is explainedfurther in the sidebar.

Below is the code that ensures a message is complete, extractsthe bytes, and creates the GpsMessage instance for furtherprocessing by other objects:

Figure 2: Packetizing the input stream

After a message has been extracted, the message must bevalidated. The validation of a GPS message involves ensuring themessage follows the defined format, and the checksum is valid.Validation of the message insures the application does not receiveinvalid data. This responsibility is assigned to the message classitself. This code is contained in the GpsMessage. isValid() methodand is used as follows:

Anyone who has an interest in receiving valid messages and is alistener of the transport will now be notified. After notification,the processing continues looking for the next message. Thisprocessing continues forever until the transport is stopped via theGpsTranspOrt. stop() method discussed earlier.

By using only the InputStream protocol in the GpsTransport, anyInputStream can be supported as the source of the GPS data. This isvery important because during the testing of this code, theFilelnputStream can test by creating and using a file as our GPSsource. That way developers don't need real operational hardwarefor complete system testing. They can also use the FilelnputStreamto simulate data that may not be easy to create in the currenthardware configuration. This is handy for GPS devices as they don'toperate well inside buildings, so actual data can be “captured”, ornew data even invented—this is how GPS code can be testedagainst exotic tropical locations—and the code tested withthe simulated stream from a file.

Accessing the Data

GPS Fix Data : This message has 14 datafields of the following form.

Position UTC

GPS Quality

Number of satellites used

Horizontal dilution of precision

Antenna altitude in meters

Geoidal separation in meters

Age of differential GPS data

Differential reference station ID

The GpsMessage contains information about asingle GPS message received from the InputStream. The message willbe responsible for returning the various data fields containedwithin the message. The message also helps the transport determineif the message is valid by insuring the checksum is correct. Forexample, the GPS Fix Data message is the message that provideslatitude and longitude data. The message instance would be able toanswer any of these values for this message.

Defining the Listener Interface

The GpsTransportListener interface defines the messageReceivedmethod that will be called when a message is received by thetransport. A message is passed as a parameter on themessageReceived notification method so that the receiving objectthat is listening can interrogate the message for any desireddata.

That the GpsTransport does not care about the implementation ofthe GpsTransportListener is an important concept. Many classes mayimplement the GpsTransportListener to perform various functions.For example, a transport debug class could be created to print allmessages received to the System.out or a log file. In thissolution, the Gps class will implement the GpsTransportListener toget the latitude and longitude.

Getting the GPS Location

The Gps class implements the GpsTransportListener and registersits interest in receiving all valid messages that are received. TheGps class' messageReceived method uses the GpsMessage parameter toretrieve any desired data from the GPS messages it receives. Inthis example , it explicitly looks for the GPS Fix Data message andsaves the current latitude and longitude.

Creating a New Transport

To support a new hardware device, these steps should be followedto create and test a new transport:

  1. Get all the documentation available about the device. Thisincludes the hardware information, the communication information(e.g. baud rate), and the message format information.
  2. Get the device and run any vendor supplied test program toinsure the device is correctly connected to your machine.
  3. Build new transport software by starting simple and iteratingcode until the desired function is complete. Since Java is highlyportable from one hardware platform to another, for convenience,most of the development and testing could be done on a developmentmachine (e.g., Windows NT) and later tested on the runtimemachine.
  4. Perform the final testing on the target machine.

Further Design Considerations

At this point, developers should examine other aspects ofpossible application solutions. An important consideration is howdoes the application code interact with the Gps object. Oneimmediate solution is to have the Gps class provide its ownlistener interface to trigger when the GPS location has changed.That way the application code could register interest with the Gpsobject for the information it is interested in, and wouldsubsequently be notified at the appropriate time, when the datachanges.

The granularity of this solution could range anywhere from whenan individual data item has changed (such as the latitude) toindicating only that the Gps object has changed in some manner, andthe particulars would be determined by further interrogation of theGps object. The granularity of the listener / notification schemewould be tuned to a developer's particular applications informationneeds and performance considerations.

Another possibility is for the individual data items themselvesto have listener interfaces. That way the latitude and longitudevalues could be encapsulated in classes like GpsLatitude andGpsLongitude and could be interacted with directly, as opposed toalways going through the Gps object to get the information. Thiswould be a great way to connect up the individual elements of theGps information to their respective individual user interfacecomponents.

Finally, the grand unification scheme should be considered.Defining a measurement interface that any measurement from anydevice could support would allow applications to receive deviceinformation in a common way.

In fact, going even further, all devices could be supported viathree simple concepts:

  1. A measurement is data sent to or received from a hardwaredevice
  2. A command is an operation or set of operations performedagainst a hardware device
  3. A signal is a notification received from a hardwaredevice.

That way, by having a common interface, application code wouldbe tremendously resilient to change. New devices, not conceived oforiginally, could be introduced to the already written applicationcode and would work fine, as long as they implemented the commoninterface. Some simple tests can be performed to see whether devicesoftware is truly resilient; the application code should not haveto be changed as a result of:

  • Changes in message formats. For example, the GPS informationcould be provided via other format than NMEA (e.g., TrimbleStandard Interface Protocol).
  • Moving to another communication device. For example, movingfrom serial to USB.

The common theme in all this discussion is the tradeoff ofinflexible simplicity for slightly more complicated flexibility.Just a little more thought and effort will pay off later in waysthat developers may not be able to foresee today.

It is relatively easy to interface with serial devices.Hopefully, developers will contemplate and employ some of theprocedures and techniques presented here whereby you can handlealmost any serially interfaced device. And not only standard RS232serial, but for an assortment of other very active serial stylebusses in use by many industries.

Maybe you have gained an appreciation for the problem ofplanning for change, even though we didn't have the space to dealwith the complete story. For example, we have an extremely robustsolution that we have used to communicate not only with a lame setof devices on an automobile bus (which changes from manufacturer tomanufacturer), but the solution smoothly handles multiple “packet”oriented communications means, serial and beyond.

Leave a Reply
"""

```json
{
  "format": {"score": 2, "justification": "The text is mostly well-structured, but there are minor issues such as the use of '0' in method names and inconsistent capitalization."},
  "voice": {"score": 0, "justification": "The text lacks a distinct authorial voice or style; it has a generic, instructional tone."},
  "knowledge_density": {"score": 2, "justification": "The text contains substantial information about serial communications, Java programming, and GPS data handling. However, some sections are repetitive and could be more concise."},
  "diversity": {"score": 1, "justification": "The text covers technical concepts related to serial communications and Java, which are somewhat specialized but not highly niche. There is little diversity in content or perspective."}
}
```